cf44ed71bf31ef57ca626df10a349ef6abb42a13
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-07-15  Ian Henderson  <ianh@apple.com>
2
3         Avoid rounded rect corner-drawing overhead if no corners are visible
4         https://bugs.webkit.org/show_bug.cgi?id=64584
5
6         Reviewed by Simon Fraser.
7
8         No new tests, rendering is visually identical.
9
10         * rendering/InlineFlowBox.cpp:
11         (WebCore::InlineFlowBox::paintBoxDecorations): Pass PaintInfo into
12         paintBorder.
13         * rendering/RenderBox.cpp:
14         (WebCore::RenderBox::paintBoxDecorations): Ditto.
15         * rendering/RenderBoxModelObject.cpp:
16         (WebCore::unroundClippedCorners):
17         (WebCore::RenderBoxModelObject::paintBorder):
18         Any invisible corner may be replaced with a corner of radius zero, as
19         long as the stroke style is solid.  Change the GraphicsContext
20         parameter into a PaintInfo parameter so we can get the rect to be
21         drawn.
22         * rendering/RenderBoxModelObject.h:
23         * rendering/RenderFieldset.cpp:
24         (WebCore::RenderFieldset::paintBoxDecorations): Pass PaintInfo into
25         paintBorder.
26         * rendering/RenderTable.cpp:
27         (WebCore::RenderTable::paintBoxDecorations): Ditto.
28         * rendering/RenderTableCell.cpp:
29         (WebCore::RenderTableCell::paintBoxDecorations): Ditto.
30
31 2011-07-15  Jeff Miller  <jeffm@apple.com>
32
33         Add UserAgentStyleSheetsData.cpp to WebCore.vcproj
34         https://bugs.webkit.org/show_bug.cgi?id=64609
35         
36         Add UserAgentStyleSheetsData.cpp to WebCore.vcproj for convenient access, but don't compile it.
37         This matches what we do with other generated DerivedSources.
38
39         Reviewed by Brian Weinstein.
40         
41         No new tests, just adding a file.
42
43         * WebCore.vcproj/WebCore.vcproj: Add UserAgentStyleSheetsData.cpp.
44
45 2011-07-15  Pratik Solanki  <psolanki@apple.com>
46
47         Part of https://bugs.webkit.org/show_bug.cgi?id=63674
48         Get webkit to compile with USE(CFNETWORK) enabled on Mac
49
50         Reviewed by David Kilzer.
51
52         No new tests because no change in functionality and option is not enabled on Mac.
53
54         * platform/network/cf/AuthenticationCF.h: Just use AuthenticationMac.h instead of having
55         Mac-specific declarations here.
56         * platform/network/cf/CredentialStorageCFNet.cpp:
57         * platform/network/mac/AuthenticationMac.h:
58
59 2011-07-15  Pratik Solanki  <psolanki@apple.com>
60
61         Part of https://bugs.webkit.org/show_bug.cgi?id=63674
62         Get webkit to compile with USE(CFNETWORK) enabled on Mac
63
64         Reviewed by David Kilzer.
65
66         Get LoaderRunLoop to work on Mac when USE(CFNETWORK) is enabled. Although we could use the
67         main run loop, it's better to have a separate thread handling the loads so that it can work
68         in parallel to the main thread. This is similar to what NSURLConnection does for us
69         internally when we use the NS APIs.
70
71         No new tests because no change in functionality and option is not enabled on Mac.
72
73         * platform/network/cf/LoaderRunLoopCF.cpp:
74         (WebCore::runLoaderThread): Create an autorelease pool for objc code that might be called in
75         the run loop.
76         (WebCore::loaderRunLoop):
77         * platform/network/cf/LoaderRunLoopCF.h:
78
79 2011-07-15  Xiaomei Ji  <xji@chromium.org>
80
81         --webkit-visual-word crash on mixed editability
82         https://bugs.webkit.org/show_bug.cgi?id=61978
83
84         --webkit-visual-word crashes (VisiblePosition.getInlineBoxAndOffset could return null box)
85         https://bugs.webkit.org/show_bug.cgi?id=62814
86
87         Reviewed by Ryosuke Niwa.
88
89         Replace previousWordPosition/nextWordPosition with previousBoundary/nextBoundary which do
90         not honor editable bounary. Honor editable boundary as the last stage of leftWordPosition
91         and rightWordPosition.
92
93         Check previousBoundary/nextBoundary against NULL.  Have a static function to encapsulate the
94         usage of getInlineBoxAndOffset and check the visible position is not NULL before passing to 
95         getInlineBoxAndOffset. Check the box returned from getInlineBoxAndOffset is not NULL before
96         accessing.
97
98         Test: editing/selection/move-by-word-visually-null-box.html
99
100         * editing/visible_units.cpp:
101         (WebCore::positionIsInBox):
102         (WebCore::previousWordBreakInBoxInsideBlockWithSameDirectionality):
103         (WebCore::lastWordBreakInBox):
104         (WebCore::positionIsVisuallyOrderedInBoxInBlockWithDifferentDirectionality):
105         (WebCore::nextWordBreakInBoxInsideBlockWithDifferentDirectionality):
106         (WebCore::positionIsInsideBox):
107         (WebCore::leftWordPositionAcrossBoundary):
108         (WebCore::rightWordPositionAcrossBoundary):
109         (WebCore::leftWordPosition):
110         (WebCore::rightWordPosition):
111
112 2011-07-15  Pratik Solanki  <psolanki@apple.com>
113
114         Remove unncessary creation of connectionProperties dictionary
115         https://bugs.webkit.org/show_bug.cgi?id=63958
116
117         Reviewed by Alexey Proskuryakov.
118
119         No new tests because no change in functionality.
120
121         * platform/network/cf/ResourceHandleCFNet.cpp:
122         (WebCore::ResourceHandle::loadResourceSynchronously):
123
124 2011-07-15  Pavel Feldman  <pfeldman@google.com>
125
126         Web Inspector: Focusing on another node while editing CSS property does not update styles
127         https://bugs.webkit.org/show_bug.cgi?id=64283
128
129         Reviewed by Yury Semikhatsky.
130
131         Test: inspector/styles/styles-change-node-while-editing.html
132
133         * inspector/front-end/CSSStyleModel.js:
134         (WebInspector.CSSProperty.prototype.setText):
135         (WebInspector.CSSProperty.prototype.setText.callback):
136         * inspector/front-end/DOMAgent.js:
137         (WebInspector.DOMAgent.prototype._inlineStyleInvalidated):
138         (WebInspector.DOMDispatcher.prototype.inlineStyleInvalidated):
139         * inspector/front-end/ElementsPanel.js:
140         (WebInspector.ElementsPanel):
141         (WebInspector.ElementsPanel.prototype._attributesUpdated):
142         (WebInspector.ElementsPanel.prototype.updateStyles):
143         * inspector/front-end/MetricsSidebarPane.js:
144         (WebInspector.MetricsSidebarPane):
145         (WebInspector.MetricsSidebarPane.prototype.update):
146         (WebInspector.MetricsSidebarPane.prototype._innerUpdate.callback):
147         (WebInspector.MetricsSidebarPane.prototype._innerUpdate.inlineStyleCallback):
148         (WebInspector.MetricsSidebarPane.prototype._innerUpdate):
149         (WebInspector.MetricsSidebarPane.prototype._styleSheetChanged):
150         (WebInspector.MetricsSidebarPane.prototype._attributesUpdated):
151         (WebInspector.MetricsSidebarPane.prototype.startEditing):
152         (WebInspector.MetricsSidebarPane.prototype.editingEnded):
153         * inspector/front-end/StylesSidebarPane.js:
154         (WebInspector.StylesSidebarPane):
155         (WebInspector.StylesSidebarPane.prototype.update):
156         (WebInspector.StylesSidebarPane.prototype._innerUpdate.stylesCallback):
157         (WebInspector.StylesSidebarPane.prototype._innerUpdate.computedStyleCallback):
158         (WebInspector.StylesSidebarPane.prototype._innerUpdate):
159         (WebInspector.StylesSidebarPane.prototype._styleSheetChanged):
160         (WebInspector.StylesSidebarPane.prototype._attributesUpdated):
161         (WebInspector.StylesSidebarPane.prototype._refreshUpdate):
162         (WebInspector.StylesSidebarPane.prototype._rebuildUpdate):
163         (WebInspector.StylesSidebarPane.prototype._nodeStylesUpdatedForTest):
164         (WebInspector.StylesSidebarPane.prototype._toggleElementStatePane):
165         (WebInspector.StylesSidebarPane.prototype._createElementStatePane.clickListener):
166         (WebInspector.StylePropertyTreeElement.prototype):
167         (WebInspector.StylePropertyTreeElement.prototype.event):
168         (WebInspector.StylePropertyTreeElement.prototype.element.userInput.previousContent.context.moveDirection):
169         (WebInspector.StylePropertyTreeElement.prototype.styleText.updateInterface.majorChange.isRevert):
170
171 2011-07-15  Mike Reed  <reed@google.com>
172
173         [skia] remove legacy draw-text-as-paths code, as skia now draws all text as text
174         https://bugs.webkit.org/show_bug.cgi?id=64368
175
176         Reviewed by James Robinson.
177
178         * platform/graphics/chromium/FontChromiumWin.cpp:
179         (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::drawGlyphs):
180         * platform/graphics/chromium/FontPlatformDataChromiumWin.cpp:
181         (WebCore::FontPlatformData::RefCountedHFONT::~RefCountedHFONT):
182         * platform/graphics/chromium/UniscribeHelper.cpp:
183         (WebCore::UniscribeHelper::draw):
184         * platform/graphics/skia/SkiaFontWin.cpp:
185         (WebCore::skiaDrawText):
186         (WebCore::setupPaintForFont):
187         (WebCore::paintSkiaText):
188         * platform/graphics/skia/SkiaFontWin.h:
189
190 2011-07-15  Piroska András  <Piroska.Andras@stud.u-szeged.hu>
191
192         Pixel difference in FEMorphology effect
193         https://bugs.webkit.org/show_bug.cgi?id=63930
194
195         Reviewed by Zoltan Herczeg.
196
197         Using short-circuit evaluation in the setFilterEffectAttribute function
198         was wrong. We should call both setRadius functions and evaluate the
199         changes separately.
200
201         * svg/SVGFEMorphologyElement.cpp:
202         (WebCore::SVGFEMorphologyElement::setFilterEffectAttribute):
203
204 2011-07-15  Jeff Miller  <jeffm@apple.com>
205
206         Fullscreen content doesn't use fullscreen controller on Windows
207         https://bugs.webkit.org/show_bug.cgi?id=64540
208         <rdar://problem/9510455>
209
210         Reviewed by Darin Adler.
211
212         RenderThemeWin needs to override extraFullScreenStyleSheet() to return
213         the fullscreenQuickTime stylesheet.
214
215         Test added to fullscreen/video-controls-override.html.
216
217         * rendering/RenderThemeWin.cpp:
218         (WebCore::RenderThemeWin::extraFullScreenStyleSheet): Added.
219         * rendering/RenderThemeWin.h: Override extraFullScreenStyleSheet().
220
221 2011-07-15  Nikolas Zimmermann  <nzimmermann@rim.com>
222
223         Not reviewed. Fix build failure introduced in r91061.
224
225         * page/Console.cpp:
226         (WebCore::Console::markTimeline): Remove argument name from unused parameter.
227
228 2011-07-15  Kenneth Rohde Christiansen  <kenneth@webkit.org>
229
230         Upstream QtWebKit/N9 changes related to visibleContentRect
231         https://bugs.webkit.org/show_bug.cgi?id=64589
232
233         Reviewed by Simon Hausmann.
234
235         Rename setActualVisibleContentRect to setFixedVisibleContentRect
236         as that makes it more obvious that it is an override. It is also
237         consistent with the setFixedLayout which is often used in
238         conjunction with it.
239
240         Make visibleContentRect return the fixed value if set, and remove
241         all calls to actualVisibleContentRect.
242
243         Also updated the documentation.
244
245         This is similar to what we have on our QtWebKit/N9 branch and is
246         pretty well tested.
247
248         * platform/ScrollView.cpp:
249         (WebCore::ScrollView::visibleContentRect):
250         If a fixed visibleContentRect is set, return that.
251         Remove the code returning the contents size when in
252         paintsEntireContents mode as that is wrong and already
253         ifdeffed out for EFL.
254         (WebCore::ScrollView::setScrollPosition):
255         Do not try to be smart and update the fixed visibleContentsRect
256         automatically, as the embedder might ignore the scroll request
257         for various reasons.
258         * platform/ScrollView.h:
259         (WebCore::ScrollView::setFixedVisibleContentRect):
260         (WebCore::ScrollView::fixedVisibleContentRect):
261
262 2011-07-15  Mike West  <mkwst@chromium.org>
263
264         Web Inspector: Rename console.markTimeline() to console.timeStamp() for Firebug compatibility.
265         https://bugs.webkit.org/show_bug.cgi?id=63317
266
267         Reviewed by Pavel Feldman.
268
269         Test: inspector/timeline/timeline-time-stamp.html
270
271         * inspector/InspectorConsoleInstrumentation.h:
272         (WebCore::InspectorInstrumentation::consoleTimeStamp):
273         * inspector/InspectorInstrumentation.cpp:
274         (WebCore::InspectorInstrumentation::consoleTimeStampImpl):
275         * inspector/InspectorInstrumentation.h:
276         * inspector/InspectorTimelineAgent.cpp:
277         (WebCore::InspectorTimelineAgent::didTimeStamp):
278         * inspector/InspectorTimelineAgent.h:
279         * inspector/TimelineRecordFactory.cpp:
280         (WebCore::TimelineRecordFactory::createTimeStampData):
281         * inspector/TimelineRecordFactory.h:
282         * inspector/front-end/TimelineAgent.js:
283         * inspector/front-end/TimelineOverviewPane.js:
284         (WebInspector.TimelineOverviewPane.prototype.update.markPercentagesForRecord):
285         (WebInspector.TimelineOverviewPane.prototype.update):
286         * inspector/front-end/TimelinePanel.js:
287         (WebInspector.TimelinePanel):
288         (WebInspector.TimelinePanel.prototype.get _recordStyles):
289         (WebInspector.TimelinePanel.prototype._updateEventDividers):
290         (WebInspector.TimelinePanel.prototype._createEventDivider):
291         (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline):
292         (WebInspector.TimelinePanel.prototype._clearPanel):
293         (WebInspector.TimelinePanel.FormattedRecord.prototype._getRecordDetails):
294         * page/Console.cpp:
295         (WebCore::Console::markTimeline):
296         (WebCore::Console::timeStamp):
297         * page/Console.h:
298         * page/Console.idl:
299
300 2011-07-15  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
301
302         LocalStorage: Changed the value type of ItemTable from TEXT to BLOB
303         to avoid string truncation.
304         This patch will also convert the exsisting ItemTable and perform
305         the DATA MIGRATION job.
306         https://bugs.webkit.org/show_bug.cgi?id=58762
307
308         Reviewed by Jeremy Orlow.
309
310         Tests: manual-tests/localstorage-value-truncation.html
311
312         * manual-tests/localstorage-value-truncation.html: Added.
313         Demostrate the testcase shown in bug 58762.
314         * platform/sql/SQLiteStatement.cpp:
315         (WebCore::SQLiteStatement::isColumnDeclearedAsBlob):
316         Test if the pre-defined type of column is BLOB.
317         * platform/sql/SQLiteStatement.h:
318         * storage/StorageAreaSync.cpp:
319         Change the localStorage value type from Text to BLOB to avoid the
320         value string truncation at \x00.
321         (WebCore::StorageAreaSync::openDatabase):
322         Change the database structure, use BLOB to replace the TEXT type of
323         value segment in ItemTable.
324         (WebCore::StorageAreaSync::migrateItemTableIfNeeded):
325         Migrate the ItemTable if the pre-defined type of value is TEXT.
326         (WebCore::StorageAreaSync::performImport):
327         Use getColumnBlobAsString() to import the BLOB value.
328         (WebCore::StorageAreaSync::sync):
329         Use bindBlob() to bind value string to the SQLiteStatement for the
330         database execution.
331         * storage/StorageAreaSync.h:
332
333 2011-07-15  Kentaro Hara  <haraken@google.com>
334
335         Clear the content of a search input form when 'Escape' is pressed.
336         https://bugs.webkit.org/show_bug.cgi?id=51897
337
338         This change added handleKeydownEvent() to a search input form,
339         which clears the form and triggers a 'search' event when 'Escape' is pressed.
340
341         Reviewed by Kent Tamura.
342
343         Test: fast/forms/input-search-press-escape-key.html
344
345         * html/SearchInputType.cpp:
346         (WebCore::SearchInputType::handleKeydownEvent):
347         * html/SearchInputType.h:
348
349 2011-07-15  Alexandru Chiculita  <achicu@adobe.com>
350
351         Move useRepaintBounds from RenderBlock::layoutRunsAndFloats to LineLayoutState
352         https://bugs.webkit.org/show_bug.cgi?id=64360
353
354         Reviewed by Hajime Morita.
355
356         No new tests needed because the patch is just a refactor.
357
358         * rendering/RenderBlock.h:
359         * rendering/RenderBlockLineLayout.cpp:
360         (WebCore::LineLayoutState::LineLayoutState):
361         (WebCore::LineLayoutState::usesRepaintBounds):
362         (WebCore::LineLayoutState::setRepaintRange):
363         (WebCore::LineLayoutState::updateRepaintRangeFromBox):
364         (WebCore::RenderBlock::layoutRunsAndFloats):
365         (WebCore::RenderBlock::determineStartPosition):
366
367 2011-07-14  MORITA Hajime  <morrita@google.com>
368
369         ExceptionCodePlaceholder should have its own ExceptionCodePlaceholder.cpp file
370         https://bugs.webkit.org/show_bug.cgi?id=64503
371
372         Reviewed by Darin Adler.
373
374         No new tests. Just a file reorg.
375
376         * CMakeLists.txt:
377         * GNUmakefile.list.am:
378         * WebCore.gypi:
379         * WebCore.pro:
380         * WebCore.vcproj/WebCore.vcproj:
381         * WebCore.xcodeproj/project.pbxproj:
382         * dom/DOMAllInOne.cpp:
383         * dom/ExceptionCodePlaceholder.cpp: Added.
384         (WebCore::NoExceptionAssertionChecker::NoExceptionAssertionChecker):
385         (WebCore::NoExceptionAssertionChecker::~NoExceptionAssertionChecker):
386         * dom/ExceptionCodePlaceholder.h: Removed NoExceptionAssertionChecker::m_function, which is loonger used.
387
388 2011-07-14  Mark Pilgrim  <pilgrim@chromium.org>
389
390         Remove LegacyDefaultOptionalArguments flag from WebGL
391         https://bugs.webkit.org/show_bug.cgi?id=64549
392
393         Reviewed by Kenneth Russell.
394
395         * html/canvas/WebGLRenderingContext.idl:
396
397 2011-07-14  Yuta Kitamura  <yutak@chromium.org>
398
399         WebSocket: Introduce pywebsocket-0.6b2
400         https://bugs.webkit.org/show_bug.cgi?id=64534
401
402         Reviewed by Kent Tamura.
403
404         pywebsocket now accepts "Sec-WebSocket-Version: 8" as required in hybi-10 specification.
405
406         No new functionality is added, thus no new tests. Existing WebSocket tests should keep passing.
407
408         * websockets/WebSocketHandshake.cpp:
409         (WebCore::WebSocketHandshake::clientHandshakeMessage):
410         (WebCore::WebSocketHandshake::clientHandshakeRequest):
411
412 2011-07-14  SravanKumar S  <sravan.ken@gmail.com>
413
414         Replaced isChecked() with shouldAppearChecked() in HTMLInputElement.cpp along with all the corresponding function calls.
415         https://bugs.webkit.org/show_bug.cgi?id=54476
416
417         Reviewed by Darin Adler.
418
419         No new tests, since existing fast/dom/HTMLInputElement/checked-pseudo-selector.html verifies the patch.
420
421         * accessibility/AccessibilityRenderObject.cpp:
422         (WebCore::AccessibilityRenderObject::isChecked):
423         * css/CSSStyleSelector.cpp:
424         (WebCore::CSSStyleSelector::canShareStyleWithControl):
425         (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
426         * dom/CheckedRadioButtons.cpp:
427         (WebCore::CheckedRadioButtons::removeButton):
428         * html/HTMLInputElement.cpp:
429         (WebCore::HTMLInputElement::shouldAppearChecked):
430         * html/HTMLInputElement.h: Removed virtual declaration from shouldAppearChecked().
431         * rendering/RenderTheme.cpp:
432         (WebCore::RenderTheme::isChecked):
433
434 2011-07-14  Kenichi Ishibashi  <bashi@chromium.org>
435
436         <input form="x"> should not associate the input with any forms when there is no  form with id="x"
437         https://bugs.webkit.org/show_bug.cgi?id=64509
438
439         Don't set form owner when a form associated element has the form attribute but there is no such form element.
440
441         Reviewed by Kent Tamura.
442
443         Test: fast/forms/form-attribute-nonexistence-form-id.html
444
445         * dom/Document.cpp:
446         (WebCore::Document::resetFormElementsOwner): Removed the argument which is no longer needed.
447         * dom/Document.h: Ditto.
448         * html/FormAssociatedElement.cpp:
449         (WebCore::FormAssociatedElement::insertedIntoTree): Resets m_form whenever the element has the form attribute.
450         (WebCore::FormAssociatedElement::resetFormOwner): Don't set m_form when there is no form element which has the given id.
451         (WebCore::FormAssociatedElement::formAttributeChanged): Removed the argument of resetFormOwner().
452         * html/FormAssociatedElement.h: Ditto.
453         * html/HTMLFormElement.cpp: Ditto.
454         (WebCore::HTMLFormElement::insertedIntoDocument):
455         (WebCore::HTMLFormElement::removedFromDocument):
456
457 2011-07-14  Kent Tamura  <tkent@chromium.org>
458
459         REGRESSION (r90809): Setting a checkbox's checked property, doesn't render as checked until app window loses focus
460         https://bugs.webkit.org/show_bug.cgi?id=64537
461
462         Reviewed by Darin Adler.
463
464         We stopped to call updateCheckedRadioButtons() for checkboxes
465         since r90809, but we need to call RenderTheme::stateChanged(),
466         which was in updateCheckedRadioButtons(), for checkboxes.
467
468         Tests: fast/forms/checkbox-appearance-change-by-checked-expected.html
469                fast/forms/checkbox-appearance-change-by-checked.html
470
471         * html/HTMLInputElement.cpp: Move the RenderTheme::stateChanged() call
472         from updateCheckedRadioButtons() to setChecked().
473         (WebCore::HTMLInputElement::updateCheckedRadioButtons):
474         (WebCore::HTMLInputElement::setChecked):
475
476 2011-07-14  Adam Barth  <abarth@webkit.org>
477
478         The beforeload event allows tracking URI changes in a frame
479         https://bugs.webkit.org/show_bug.cgi?id=64482
480
481         Reviewed by Nate Chapin.
482
483         Tests: http/tests/security/beforeload-iframe-client-redirect.html
484                http/tests/security/beforeload-iframe-server-redirect.html
485
486         Only dispatch the beforeload event for a frame if we haven't yet
487         committed our first real load.  The URL that we send to our parent will
488         be the same URL the parent seens in the src attribute.
489
490         * loader/FrameLoader.cpp:
491         (WebCore::FrameLoader::loadWithDocumentLoader):
492
493 2011-07-14  Dan Bernstein  <mitz@apple.com>
494
495         LLVM Compiler build fix.
496
497         * css/CSSStyleApplyProperty.cpp:
498         (WebCore::ApplyPropertyComputeLength::applyValue):
499
500 2011-07-14  Darin Adler  <darin@apple.com>
501
502         [Mac] Use [NSCursor operationNotAllowedCursor] for CSS no-drop as well as CSS not-allowed
503         https://bugs.webkit.org/show_bug.cgi?id=64570
504
505         Reviewed by Alexey Proskuryakov.
506
507         Mac OS X documentation and usage makes it clear that this cursor is usually used for no-drop,
508         and that it's also reasonable to use it for not-allowed.
509
510         * platform/mac/CursorMac.mm:
511         (WebCore::Cursor::ensurePlatformCursor): Use [NSCursor operationNotAllowedCursor] for
512         Cursor::NoDrop.
513
514 2011-07-14  Luke Macpherson   <macpherson@chromium.org>
515
516         Reviewed by Dimitri Glazkov.
517
518         Introduce templated compute length class in CSSStyleApplyProperty, and use to handle several CSS properties.
519         https://bugs.webkit.org/show_bug.cgi?id=62957
520
521         No new tests / refactoring only.
522
523         * css/CSSPrimitiveValue.cpp:
524         (WebCore::CSSPrimitiveValue::computeLength):
525         Add computeLength function that returns unsigned short.
526         * css/CSSStyleApplyProperty.cpp:
527         (WebCore::ApplyPropertyComputeLength::ApplyPropertyComputeLength):
528         Added class to handle computeLength based properties.
529         (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
530         Initialize ApplyPropertyComputeLength for appropriate properties.
531         * css/CSSStyleSelector.cpp:
532         (WebCore::CSSStyleSelector::useSVGZoomRules):
533         Make this a public member function instead of a private static function.
534         (WebCore::CSSStyleSelector::applyProperty):
535         Removed code now implemented in CSSStyleApplyProperty.
536         (WebCore::CSSStyleSelector::setFontSize):
537         Use new useSVGZoomRules function.
538         * css/CSSStyleSelector.h:
539         Add interface for useSVGZoomRules.
540
541 2011-07-14  Antti Koivisto  <antti@apple.com>
542
543         REGRESSION: Should not dispatch didFirstVisuallyNonEmptyLayout for the initial empty document
544         https://bugs.webkit.org/show_bug.cgi?id=64557
545
546         Reviewed by Kenneth Rohde Christiansen.
547
548         Avoid sending didFirstVisuallyNonEmptyLayout for the initial empty document of the frame. The
549         clients may not expect it and it doesn't make much sense in any case.
550
551         * page/FrameView.cpp:
552         (WebCore::FrameView::performPostLayoutTasks):
553
554 2011-07-14  Jeffrey Pfau  <jpfau@apple.com>
555
556         Character reference parser for new XML parser
557         https://bugs.webkit.org/show_bug.cgi?id=64398
558
559         Reviewed by Adam Barth.
560
561         Refactored out the HTML entity parser and added a common template for parsing character references.
562
563         * WebCore.xcodeproj/project.pbxproj:
564         * html/parser/HTMLEntityParser.cpp:
565         (WebCore::consumeHTMLEntity):
566         * xml/parser/CharacterReferenceParserInlineMethods.h: Copied from Source/WebCore/html/parser/HTMLEntityParser.cpp.
567         (WebCore::isHexDigit):
568         (WebCore::unconsumeCharacters):
569         (WebCore::consumeCharacterReference):
570         * xml/parser/XMLCharacterReferenceParser.cpp: Added.
571         (WebCore::consumeXMLCharacterReference):
572         * xml/parser/XMLCharacterReferenceParser.h: Added.
573
574 2011-07-14  Ilya Tikhonovsky  <loislo@chromium.org>
575
576         Reviewed by Pavel Feldman.
577
578         Web Inspector: panel switching is too slow.
579         https://bugs.webkit.org/show_bug.cgi?id=60959
580
581         * inspector/front-end/inspector.css:
582         (.panel):
583         (.panel.visible):
584
585 2011-07-14  Andrey Kosyakov  <caseq@chromium.org>
586
587         Web Inspector: remove more unused CSS from inspector.css
588         https://bugs.webkit.org/show_bug.cgi?id=64529
589
590         Reviewed by Pavel Feldman.
591
592         * inspector/front-end/inspector.css:
593
594 2011-07-14  Ryosuke Niwa  <rniwa@webkit.org>
595
596         Move subtreeHasChanged from RenderTextControl to HTMLTextFormControlElement
597         https://bugs.webkit.org/show_bug.cgi?id=64476
598
599         Reviewed by Kent Tamura.
600
601         Moved subtreeHasChanged from RenderTextControl, RenderTextControlSingleLine, and
602         RenderTextControlMultiLine to HTMLTextFormControlElement, HTMLInputElement, and
603         HTMLTextAreaElement. Also moved m_searchEventTimer and related functions from
604         RenderTextSingleLine to SearchInputType.
605
606         * html/HTMLInputElement.cpp:
607         (WebCore::HTMLInputElement::subtreeHasChanged): Moved from RenderTextControlSingleLine.
608         (WebCore::HTMLInputElement::onSearch): Calls stopSearchEventTimer.
609         * html/HTMLInputElement.h:
610         * html/HTMLTextAreaElement.cpp:
611         (WebCore::HTMLTextAreaElement::subtreeHasChanged): Moved from RenderTextMultiLine.
612         * html/HTMLTextAreaElement.h:
613         * html/HTMLTextFormControlElement.cpp:
614         (WebCore::HTMLTextFormControlElement::defaultEventHandler): Calls subtreeHasChanged.
615         (WebCore::HTMLTextFormControlElement::subtreeHasChanged): Added; calls respondToChangeByUser.
616         * html/HTMLTextFormControlElement.h:
617         * html/SearchInputType.cpp:
618         (WebCore::SearchInputType::SearchInputType): Initializes m_searchEventTimer.
619         (WebCore::SearchInputType::startSearchEventTimer): Moved from RenderTextControlSingleLine.
620         (WebCore::SearchInputType::stopSearchEventTimer): Ditto.
621         (WebCore::SearchInputType::searchEventTimerFired): Ditto.
622         * html/SearchInputType.h:
623         * html/TextFieldInputType.cpp:
624         (WebCore::TextFieldInputType::handleBeforeTextInsertedEvent): Updated comment.
625         * rendering/RenderTextControl.cpp:
626         * rendering/RenderTextControl.h:
627         (WebCore::RenderTextControl::respondToChangeByUser): Renamed from subtreeHasChanged.
628         * rendering/RenderTextControlMultiLine.cpp:
629         * rendering/RenderTextControlMultiLine.h:
630         * rendering/RenderTextControlSingleLine.cpp:
631         (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine): No longer initializes
632         m_searchEventTimer.
633         * rendering/RenderTextControlSingleLine.h:
634
635 2011-07-14  Vsevolod Vlasov  <vsevik@chromium.org>
636
637         Move XML errors handling out from XMLDocumentParser (refactoring).
638         https://bugs.webkit.org/show_bug.cgi?id=64305
639
640         XML errors handling logic is moved out from XMLDocumentParser to allow using it for XSLT error handling as well.
641
642         Reviewed by Adam Barth.
643
644         No tests needed as there is no new functionality added.
645
646         * CMakeLists.txt:
647         * GNUmakefile.list.am:
648         * WebCore.gypi:
649         * WebCore.pro:
650         * WebCore.vcproj/WebCore.vcproj:
651         * WebCore.xcodeproj/project.pbxproj:
652         * xml/XMLErrors.cpp: Added.
653         (WebCore::XMLErrors::XMLErrors):
654         (WebCore::XMLErrors::handleError):
655         (WebCore::XMLErrors::appendErrorMessage):
656         (WebCore::createXHTMLParserErrorHeader):
657         (WebCore::XMLErrors::insertErrorMessageBlock):
658         * xml/XMLErrors.h: Added.
659         * xml/parser/XMLDocumentParser.cpp:
660         (WebCore::XMLDocumentParser::pushCurrentNode):
661         (WebCore::XMLDocumentParser::handleError):
662         (WebCore::XMLDocumentParser::insertErrorMessageBlock):
663         * xml/parser/XMLDocumentParser.h:
664         * xml/parser/XMLDocumentParserLibxml2.cpp:
665         (WebCore::PendingCallbacks::appendErrorCallback):
666         (WebCore::XMLDocumentParser::XMLDocumentParser):
667         (WebCore::XMLDocumentParser::doWrite):
668         (WebCore::XMLDocumentParser::error):
669         (WebCore::warningHandler):
670         (WebCore::fatalErrorHandler):
671         (WebCore::normalErrorHandler):
672         * xml/parser/XMLDocumentParserQt.cpp:
673         (WebCore::XMLDocumentParser::XMLDocumentParser):
674         (WebCore::XMLDocumentParser::doWrite):
675         (WebCore::XMLDocumentParser::doEnd):
676         (WebCore::XMLDocumentParser::parse):
677         (WebCore::XMLDocumentParser::parseStartElement):
678         (WebCore::XMLDocumentParser::parseDtd):
679
680 2011-07-14  Vsevolod Vlasov  <vsevik@chromium.org>
681
682         Web Inspector: InspectorResourceAgent should generate unique identifier and save cachedResource for resources from memory cache.
683         https://bugs.webkit.org/show_bug.cgi?id=64356
684
685         Reviewed by Yury Semikhatsky.
686
687         * inspector/Inspector.json:
688         * inspector/InspectorInstrumentation.cpp:
689         (WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCacheImpl):
690         * inspector/InspectorInstrumentation.h:
691         (WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCache):
692         * inspector/InspectorResourceAgent.cpp:
693         (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
694         * inspector/InspectorResourceAgent.h:
695         * inspector/front-end/NetworkManager.js:
696         (WebInspector.NetworkManager.prototype.requestContent):
697         (WebInspector.NetworkDispatcher):
698         (WebInspector.NetworkDispatcher.prototype.resourceLoadedFromMemoryCache):
699         (WebInspector.NetworkDispatcher.prototype._appendRedirect):
700         * inspector/front-end/NetworkPanel.js:
701         (WebInspector.NetworkLogView.prototype._frameNavigated):
702         * loader/FrameLoader.cpp:
703         (WebCore::FrameLoader::loadedResourceFromMemoryCache):
704         * loader/FrameLoader.h:
705
706 2011-07-14  Tim Horton  <timothy_horton@apple.com>
707
708         Clear SVGElementInstance's children immediately upon detachment
709         https://bugs.webkit.org/show_bug.cgi?id=63739
710         <rdar://problem/9705708>
711
712         Reviewed by Nikolas Zimmermann.
713
714         In addition to clearing the instance's children in the destructor,
715         clear them when the instance is detached from its <use>. This way,
716         we won't attempt to use them after we're detached but before the
717         destructor has been called.
718
719         Test: svg/custom/use-crash-using-children-before-destroy.svg
720
721         * svg/SVGElementInstance.cpp:
722         (WebCore::SVGElementInstance::~SVGElementInstance):
723         (WebCore::SVGElementInstance::clearChildren):
724         * svg/SVGElementInstance.h:
725         * svg/SVGUseElement.cpp:
726         (WebCore::SVGUseElement::detachInstance):
727
728 2011-07-14  Nate Chapin  <japhet@chromium.org>
729
730         Don't skip custom cursors if an Image* is null,
731         since this can lead to a non-custom Cursor flickering 
732         back in when the custom cursor hasn't finished loading yet.
733         https://bugs.webkit.org/show_bug.cgi?id=64321
734
735         Reviewed by Darin Fisher.
736
737         Manual test, since we're testing visual flickering.
738
739         * manual-tests/canvas-cursor.html: Added.
740         * page/EventHandler.cpp:
741         (WebCore::EventHandler::selectCursor):
742         * platform/Cursor.cpp:
743         (WebCore::determineHotSpot):
744
745 2011-07-14  Young Han Lee  <joybro@company100.net>
746
747         Reviewed by Dirk Schulze.
748
749         REGRESSION (r89774): svg/W3C-SVG-1.1/animate-elem-82-t.svg hits assertion failure.
750         https://bugs.webkit.org/show_bug.cgi?id=63911
751
752         Some functions assumed calculateKeyTimesIndex() does not return the last index of
753         the keyTimes, but it would be right behavior for calculateKeyTimesIndex() when it
754         accepts 1 as the percent argument.
755
756         To avoid the assumption, and for more efficiency, this patch allows the functions
757         using calculateKeyTimesIndex() to return early when it accepts 1 as the percent argument.
758         These functions have always returned the last element of the corresponding vector
759         in that situation.
760
761         * svg/SVGAnimationElement.cpp:
762         (WebCore::SVGAnimationElement::calculatePercentFromKeyPoints):
763         (WebCore::SVGAnimationElement::currentValuesForValuesAnimation):
764
765 2011-07-14  Andrey Kosyakov  <caseq@chromium.org>
766
767         Web Inspector: remove more dead code
768         https://bugs.webkit.org/show_bug.cgi?id=64524
769
770         Reviewed by Yury Semikhatsky.
771
772         * WebCore.gypi:
773         * inspector/front-end/SummaryBar.js: Removed.
774         * inspector/front-end/WebKit.qrc:
775         * inspector/front-end/inspector.css:
776         * inspector/front-end/inspector.html:
777
778 2011-07-14  Peter Varga  <pvarga@webkit.org>
779
780         [Qt][V8] Build fix after r90830.
781
782         Reviewed by Csaba Osztrogonác.
783
784         The histogramEnumeration() function isn't available from the Qt port's
785         PlatformBridge.h because this function is Chromium specific.
786         Since the http://trac.webkit.org/changeset/90830 change we need to
787         guard the usage of the histogramEnumeration() function.
788
789         No new tests needed.
790
791         * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp:
792         (WebCore::V8InspectorFrontendHost::recordActionTakenCallback):
793         (WebCore::V8InspectorFrontendHost::recordPanelShownCallback):
794         (WebCore::V8InspectorFrontendHost::recordSettingChangedCallback):
795
796 2011-07-14  Yury Semikhatsky  <yurys@chromium.org>
797
798         Web Inspector: show only Console and Scripts panels in shared worker inspector front-end
799         https://bugs.webkit.org/show_bug.cgi?id=64519
800
801         Reviewed by Pavel Feldman.
802
803         * inspector/front-end/WorkerManager.js:
804         (WebInspector.WorkerManager):
805         (WebInspector.WorkerManager.isWorkerFrontend):
806         (WebInspector.WorkerManager.isSharedWorkerFrontend):
807         (WebInspector.WorkerManager.prototype._openInspectorWindow):
808         (WebInspector.DedicatedWorkerMessageForwarder):
809
810 2011-07-14  MORITA Hajime  <morrita@google.com>
811
812         Unreviewed, rolling out r90976, r90981, and r90985.
813         http://trac.webkit.org/changeset/90976
814         http://trac.webkit.org/changeset/90981
815         http://trac.webkit.org/changeset/90985
816         https://bugs.webkit.org/show_bug.cgi?id=64251
817
818         build break
819
820         * WebCore.exp.in:
821         * dom/NodeRenderingContext.cpp:
822         (WebCore::NodeRenderingContext::NodeRenderingContext):
823         (WebCore::NodeRenderingContext::nextRenderer):
824         (WebCore::NodeRenderingContext::previousRenderer):
825         * dom/NodeRenderingContext.h:
826         * dom/ShadowContentElement.cpp:
827         (WebCore::ShadowContentElement::attach):
828         (WebCore::ShadowContentElement::detach):
829         * dom/ShadowContentElement.h:
830         * dom/ShadowContentSelector.cpp:
831         (WebCore::ShadowContentSelector::ShadowContentSelector):
832         (WebCore::ShadowContentSelector::selectInclusion):
833         (WebCore::ShadowContentSelector::willAttachContentFor):
834         (WebCore::ShadowContentSelector::didAttachContent):
835         (WebCore::ShadowContentSelector::activeElement):
836         * dom/ShadowContentSelector.h:
837         * dom/ShadowRoot.cpp:
838         (WebCore::ShadowRoot::~ShadowRoot):
839         (WebCore::ShadowRoot::activeContentElement):
840         * dom/ShadowRoot.h:
841         * testing/Internals.cpp:
842         * testing/Internals.h:
843         * testing/Internals.idl:
844
845 2011-07-13  Ryosuke Niwa  <rniwa@webkit.org>
846
847         Move forwardEvent from RenderTextControl to HTMLTextFormControlElement
848         https://bugs.webkit.org/show_bug.cgi?id=64475
849
850         Reviewed by Kent Tamura.
851
852         Moved forwardEvent from RenderTextControl, RenderTextControlSingleLine, and RenderTextControlMultiLine
853         to HTMLTextFormControlElement, HTMLInputElement, and HTMLTextAreaElement.
854
855         This removes the last dependency on Event.h and EventNames.h in the cpp files for the above render
856         objects classes.
857
858         * html/HTMLTextAreaElement.cpp:
859         (WebCore::HTMLTextAreaElement::defaultEventHandler):
860         * html/HTMLTextFormControlElement.cpp:
861         (WebCore::HTMLTextFormControlElement::forwardEvent):
862         * html/HTMLTextFormControlElement.h:
863         * html/TextFieldInputType.cpp:
864         (WebCore::TextFieldInputType::forwardEvent):
865         * rendering/RenderTextControl.cpp:
866         * rendering/RenderTextControl.h:
867         * rendering/RenderTextControlMultiLine.cpp:
868         * rendering/RenderTextControlMultiLine.h:
869         * rendering/RenderTextControlSingleLine.cpp:
870         * rendering/RenderTextControlSingleLine.h:
871
872 2011-07-13  Ilya Tikhonovsky  <loislo@chromium.org>
873
874         Web Inspector: if you rename an element into the INPUT element the browser will crash.
875         https://bugs.webkit.org/show_bug.cgi?id=64292
876
877         Reviewed by Joseph Pecoraro.
878
879         * inspector/InspectorDOMAgent.cpp:
880         (WebCore::InspectorDOMAgent::setNodeName):
881         Unnecessary function call copyNonAttributeProperties was removed.
882
883 2011-07-13  Yuta Kitamura  <yutak@chromium.org>
884
885         WebSocket: Implement hybi handshake
886         https://bugs.webkit.org/show_bug.cgi?id=64344
887
888         Reviewed by Kent Tamura.
889
890         Implement WebSocket handshake which is described at
891         <http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-10#section-5.1>.
892
893         Notable differences from hixie-76 protocol are:
894         - Challenge-response scheme has been changed dramatically.
895         - Servers do not send Sec-WebSocket-Location and Sec-WebSocket-Origin anymore.
896         - The value of "Upgrade" header has been changed to "websocket" (lower-case only).
897         - "Origin" header in client's request is renamed to "Sec-WebSocket-Origin".
898
899         New tests: http/tests/websocket/tests/hybi/handshake-fail-by-extensions-header.html
900                    http/tests/websocket/tests/hybi/handshake-fail-by-no-accept-header.html
901                    http/tests/websocket/tests/hybi/handshake-fail-by-wrong-accept-header.html
902
903         Note: Tests under hybi/ directory (including the new ones) are skipped and cannot be enabled
904         yet, because pywebsocket does not accept requests from half-baked client implementation
905         (i.e. hybi handshake + hixie-76 framing). They will be unskipped when hybi framing is landed
906         in WebCore.
907
908         * websockets/WebSocketHandshake.cpp:
909         Functions and members only used for hixie-76 handshake are renamed so that they are not confused
910         with hybi-10's ones.
911         (WebCore::generateHixie76SecWebSocketKey):
912         (WebCore::generateHixie76Key3):
913         (WebCore::generateHixie76ExpectedChallengeResponse):
914         (WebCore::generateSecWebSocketKey):
915         Generates a value for Sec-WebSocket-Key as stated in hybi-10.
916         (WebCore::getExpectedWebSocketAccept):
917         Calculates the expected value of Sec-WebSocket-Accept.
918         (WebCore::WebSocketHandshake::WebSocketHandshake):
919         (WebCore::WebSocketHandshake::clientHandshakeMessage):
920         (WebCore::WebSocketHandshake::clientHandshakeRequest):
921         (WebCore::WebSocketHandshake::readServerHandshake):
922         (WebCore::WebSocketHandshake::serverWebSocketAccept):
923         (WebCore::WebSocketHandshake::serverWebSocketExtensions):
924         (WebCore::WebSocketHandshake::checkResponseHeaders):
925         * websockets/WebSocketHandshake.h:
926
927 2011-07-13  MORITA Hajime  <morrita@google.com>
928
929         [ShadowContentElement] forwarded node should be able to access its hosting content element.
930         https://bugs.webkit.org/show_bug.cgi?id=64251
931         
932         Reviewed by Dimitri Glazkov.
933
934         - Introduced ShadowInclusionSet to manage included nodes to its includer content element.
935           ShadowInclusionSet instance is owned by ShadowRoot.
936         - Updated the set on inclusion list changes.
937         - Used the set to retrieve the content element of NodeRenderingContext.
938         
939         There are also related refactoring and cleanup:
940         - Renamed NodeRenderingContext::m_contentElement to m_includer
941         - ShadowContentSelector::m_activeElement is no longer used, thus removed.
942         
943         Test: fast/dom/shadow/content-element-includer.html
944
945         * WebCore.exp.in:
946         * dom/NodeRenderingContext.cpp:
947         (WebCore::NodeRenderingContext::NodeRenderingContext):
948         (WebCore::NodeRenderingContext::nextRenderer):
949         (WebCore::NodeRenderingContext::previousRenderer):
950         * dom/NodeRenderingContext.h:
951         (WebCore::NodeRenderingContext::includer): 
952         * dom/ShadowContentElement.cpp:
953         (WebCore::removeFromSet): Added
954         (WebCore::addToSet): Added
955         (WebCore::ShadowContentElement::attach):
956         (WebCore::ShadowContentElement::detach):
957         * dom/ShadowContentElement.h:
958         (WebCore::ShadowInclusionSet::add):
959         (WebCore::ShadowInclusionSet::remove):
960         (WebCore::ShadowInclusionSet::isEmpty):
961         (WebCore::ShadowInclusionSet::Translator::hash):
962         (WebCore::ShadowInclusionSet::Translator::equal):
963         (WebCore::ShadowInclusionSet::Hash::hash):
964         (WebCore::ShadowInclusionSet::Hash::equal):
965         (WebCore::ShadowInclusionSet::find):
966         * dom/ShadowContentSelector.cpp:
967         (WebCore::ShadowContentSelector::ShadowContentSelector):
968         (WebCore::ShadowContentSelector::selectInclusion):
969         * dom/ShadowContentSelector.h:
970         * dom/ShadowRoot.cpp:
971         (WebCore::ShadowRoot::~ShadowRoot):
972         (WebCore::ShadowRoot::includerFor): Replaced activeElement()
973         (WebCore::ShadowRoot::inclusions): Added
974         (WebCore::ShadowRoot::ensureInclusions): Added
975         * dom/ShadowRoot.h:
976         (WebCore::toShadowRoot):
977         * testing/Internals.cpp:
978         (WebCore::Internals::includerFor):
979         * testing/Internals.h:
980         * testing/Internals.idl:
981
982 2011-07-12  Dominic Cooney  <dominicc@chromium.org>
983
984         Raise if dispatchEvent dispatches an event that is being dispatched
985         https://bugs.webkit.org/show_bug.cgi?id=64150
986
987         Reviewed by Dimitri Glazkov.
988
989         Spec: http://www.w3.org/TR/DOM-Level-3-Events/#events-EventTarget-dispatchEvent
990
991         Test: fast/events/dispatch-event-being-dispatched.html
992
993         * dom/Event.h:
994         (WebCore::Event::isBeingDispatched): Added.
995         * dom/EventException.h:
996         * dom/EventException.idl: Add DISPATCH_REQUEST_ERR.
997         * dom/EventTarget.cpp:
998         (WebCore::EventTarget::dispatchEvent): Raise if being dispatched.
999         * dom/ExceptionCode.cpp: Add gunk for DISPATCH_REQUEST_ERR.
1000
1001 2011-07-13  Kent Tamura  <tkent@chromium.org>
1002
1003         Implement text field placeholders using shadow DOM
1004         https://bugs.webkit.org/show_bug.cgi?id=64253
1005
1006         Reviewed by Dimitri Glazkov.
1007
1008         Represents a placeholder text as a shadow element, and its
1009         visibility is controlled by 'visibility' CSS property.
1010
1011         This patch removes all of existing code about placeholder from
1012         RenderTextControl*. RenderTextControl* have only small code about
1013         placeholder layout.
1014
1015         Also, this patch removes INPUT_PLACEHOLDER legacy pseudo ID, and
1016         the placeholder style uses Element::shadowPseudoId().
1017
1018         This fixes the following regressions:
1019         - https://bugs.webkit.org/show_bug.cgi?id=51290
1020         - https://bugs.webkit.org/show_bug.cgi?id=54797
1021         - https://bugs.webkit.org/show_bug.cgi?id=54814
1022         - https://bugs.webkit.org/show_bug.cgi?id=63367
1023
1024         Test: fast/forms/textarea-placeholder-wrapping.html
1025
1026         * css/CSSSelector.cpp: Remove INPUT_PLACEHOLDER legacy pseudo ID.
1027         (WebCore::CSSSelector::pseudoId):
1028         (WebCore::nameToPseudoTypeMap):
1029         (WebCore::CSSSelector::extractPseudoType):
1030         * css/CSSSelector.h: ditto.
1031         * css/html.css:
1032         (::-webkit-input-placeholder): Added. This contains properties
1033         common in <input> and <textarea>. Some properties have !important
1034         so that a stylesheet specified by a page author won't break
1035         WebKit's assumption.
1036         (input::-webkit-input-placeholder, isindex::-webkit-input-placeholder):
1037          Added the default style for <input> placeholders.
1038         * html/HTMLInputElement.cpp:
1039         (WebCore::HTMLInputElement::placeholderElement): Delegate to an InputType.
1040         (WebCore::HTMLInputElement::updatePlaceholderText): ditto.
1041         * html/HTMLInputElement.h: Declare placeholderElement() and updatePlaceholderText().
1042         * html/HTMLTextAreaElement.cpp:
1043         (WebCore::HTMLTextAreaElement::createRenderer):
1044         Remove the 'placeholderVisible' argument.
1045         (WebCore::HTMLTextAreaElement::placeholderElement): Added.
1046         (WebCore::HTMLTextAreaElement::updatePlaceholderText):
1047          Added. This creates, deletes, or updates the placeholder element.
1048         * html/HTMLTextAreaElement.h:
1049         - Declare placeholderElement() and updatePlaceholderText().
1050         - Add m_placeholder.
1051         * html/HTMLTextFormControlElement.cpp:
1052         (WebCore::HTMLTextFormControlElement::updatePlaceholderVisibility):
1053         Update the placeholder element and 'visibility' CSS property,
1054         instead of delegating the job to a renderer.
1055         * html/HTMLTextFormControlElement.h:
1056         Declare two pure virtual functions: placeholderElement() and updatePlaceholderText().
1057         * html/InputType.cpp:
1058         (WebCore::InputType::placeholderElement): Add an empty implementation.
1059         (WebCore::InputType::updatePlaceholderText): Add an empty implementation.
1060         * html/InputType.h: Declare placeholderElement() and updatePlaceholderText().
1061         * html/TextFieldInputType.cpp:
1062         (WebCore::TextFieldInputType::createRenderer):
1063         Remove the 'placeholderVisible' argument.
1064         (WebCore::TextFieldInputType::placeholderElement): Added.
1065         (WebCore::TextFieldInputType::destroyShadowSubtree): Deletes m_placeholder.
1066         (WebCore::TextFieldInputType::updatePlaceholderText):
1067          Added. This creates, deletes, or updates the placeholder element.
1068         * html/TextFieldInputType.h:
1069         - Declare placeholderElement() and updatePlaceholderText().
1070         - Add m_placeholder.
1071         * rendering/RenderTextControl.cpp:
1072         (WebCore::RenderTextControl::RenderTextControl):
1073         Remove the 'placeholderVisible' argument.
1074         (WebCore::RenderTextControl::layoutSpecialExcludedChild):
1075         Excludes the placeholder renderer in order to avoid to secure a box for
1076         the placeholder.
1077         * rendering/RenderTextControl.h:
1078         - Remove declarations of removed functions.
1079         - Update the RenderTextControl signature.
1080         - Add layoutSpecialExcludedChild().
1081         * rendering/RenderTextControlMultiLine.cpp:
1082         (WebCore::RenderTextControlMultiLine::RenderTextControlMultiLine):
1083         Remove the 'placeholderVisible' argument.
1084         (WebCore::RenderTextControlMultiLine::layoutSpecialExcludedChild):
1085         Laying out the placeholder box so that it has correct width and location.
1086         * rendering/RenderTextControlMultiLine.h:
1087         - Remove declarations of removed functions.
1088         - Update the RenderTextControlMultiLine signature.
1089         - Add layoutSpecialExcludedChild().
1090         * rendering/RenderTextControlSingleLine.cpp:
1091         (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine):
1092         Remove the 'placeholderVisible' argument.
1093         (WebCore::RenderTextControlSingleLine::layout):
1094         Laying out the placeholder box so that it has correct width and location.
1095         * rendering/RenderTextControlSingleLine.h:
1096         - Remove declarations of removed functions.
1097         - Update the RenderTextControlSingleLine signature.
1098         * rendering/style/RenderStyleConstants.h: Remove INPUT_PLACEHOLDER.
1099
1100 2011-07-13  James Simonsen  <simonjam@chromium.org>
1101
1102         Remove hack that forcefully prevents scripts from running in shadow SVG
1103         https://bugs.webkit.org/show_bug.cgi?id=64419
1104
1105         This hack was put in to prevent scripts from running in shadow SVG. This should never have
1106         happened, but did because we didn't parse <script> tags in SVG properly. This was fixed in
1107         r88584, so the hack is no longer needed.
1108
1109         No new tests since there is no change in functionality.
1110
1111         Reviewed by Tony Gentilcore.
1112
1113         * dom/ScriptElement.cpp:
1114         (WebCore::ScriptElement::prepareScript):
1115
1116 2011-07-13  Mihnea Ovidenie  <mihnea@adobe.com>
1117
1118         [CSSRegions] Parse -webkit-content-order property
1119         https://bugs.webkit.org/show_bug.cgi?id=63897
1120
1121         Reviewed by David Hyatt.
1122
1123         Test: fast/regions/webkit-content-order-parsing.html
1124
1125         * css/CSSComputedStyleDeclaration.cpp:
1126         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1127         * css/CSSParser.cpp:
1128         (WebCore::CSSParser::parseValue):
1129         * css/CSSPropertyNames.in:
1130         * css/CSSStyleSelector.cpp:
1131         (WebCore::CSSStyleSelector::applyProperty):
1132         * rendering/style/RenderStyle.cpp:
1133         (WebCore::RenderStyle::diff):
1134         * rendering/style/RenderStyle.h:
1135         (WebCore::InheritedFlags::regionIndex):
1136         (WebCore::InheritedFlags::setRegionIndex):
1137         (WebCore::InheritedFlags::initialRegionIndex):
1138         * rendering/style/StyleRareNonInheritedData.cpp:
1139         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
1140         (WebCore::StyleRareNonInheritedData::operator==):
1141         * rendering/style/StyleRareNonInheritedData.h:
1142
1143 2011-07-13  James Robinson  <jamesr@chromium.org>
1144
1145         Reviewed by Kenneth Russell.
1146
1147         [chromium] Move draw implementation for ContentLayerChromium/ImageLayerChromium to the appropriate CCLayerImpl subclass
1148         https://bugs.webkit.org/show_bug.cgi?id=58833
1149
1150         Adds a TiledLayerChromium class to handle the tiling logic shared by ContentLayerChromium and ImageLayerChromium
1151         so that they can be siblings in the class hierarchy instead of children. Also adds a CCTiledLayerImpl to handle
1152         the drawing responsibilities for tiled layers.
1153
1154         TiledLayerChromium maintains a tiler, tiling options, and calculates the tiling transform. Subclasses are
1155         responsible for providing an appropriate texture updater implementation. CCTiledLayerImpl takes the tiler,
1156         tiling transform and layer properties and draws the layer.  Longer term it'd be better of the CCTiledLayerImpl
1157         owned the tiler and the TiledLayerChromium only owned an updater, but getting there will require changing the
1158         way tile eviction works.
1159
1160         * WebCore.gypi:
1161         * platform/graphics/chromium/ContentLayerChromium.cpp:
1162         (WebCore::ContentLayerChromium::ContentLayerChromium):
1163         (WebCore::ContentLayerChromium::paintContentsIfDirty):
1164         (WebCore::ContentLayerChromium::drawsContent):
1165         * platform/graphics/chromium/ContentLayerChromium.h:
1166         (WebCore::ContentLayerChromium::textureUpdater):
1167         * platform/graphics/chromium/ImageLayerChromium.cpp:
1168         (WebCore::ImageLayerChromium::ImageLayerChromium):
1169         (WebCore::ImageLayerChromium::cleanupResources):
1170         (WebCore::ImageLayerChromium::paintContentsIfDirty):
1171         (WebCore::ImageLayerChromium::textureUpdater):
1172         (WebCore::ImageLayerChromium::contentBounds):
1173         (WebCore::ImageLayerChromium::drawsContent):
1174         (WebCore::ImageLayerChromium::createTextureUpdaterIfNeeded):
1175         * platform/graphics/chromium/ImageLayerChromium.h:
1176         * platform/graphics/chromium/LayerChromium.cpp:
1177         (WebCore::LayerChromium::pushPropertiesTo):
1178         (WebCore::LayerChromium::ccLayerImpl):
1179         * platform/graphics/chromium/LayerChromium.h:
1180         * platform/graphics/chromium/LayerRendererChromium.cpp:
1181         (WebCore::LayerRendererChromium::drawRootLayer):
1182         * platform/graphics/chromium/LayerTilerChromium.cpp:
1183         (WebCore::LayerTilerChromium::updateRect):
1184         (WebCore::LayerTilerChromium::draw):
1185         (WebCore::LayerTilerChromium::drawTiles):
1186         * platform/graphics/chromium/LayerTilerChromium.h:
1187         * platform/graphics/chromium/TiledLayerChromium.cpp: Added.
1188         (WebCore::TiledLayerChromium::TiledLayerChromium):
1189         (WebCore::TiledLayerChromium::~TiledLayerChromium):
1190         (WebCore::TiledLayerChromium::createCCLayerImpl):
1191         (WebCore::TiledLayerChromium::cleanupResources):
1192         (WebCore::TiledLayerChromium::setLayerRenderer):
1193         (WebCore::TiledLayerChromium::updateTileSizeAndTilingOption):
1194         (WebCore::TiledLayerChromium::drawsContent):
1195         (WebCore::TiledLayerChromium::createTilerIfNeeded):
1196         (WebCore::TiledLayerChromium::updateCompositorResources):
1197         (WebCore::TiledLayerChromium::setTilingOption):
1198         (WebCore::TiledLayerChromium::setIsMask):
1199         (WebCore::TiledLayerChromium::tilingTransform):
1200         (WebCore::TiledLayerChromium::pushPropertiesTo):
1201         (WebCore::writeIndent):
1202         (WebCore::TiledLayerChromium::dumpLayerProperties):
1203         * platform/graphics/chromium/TiledLayerChromium.h: Added.
1204         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
1205         (WebCore::CCLayerImpl::draw):
1206         * platform/graphics/chromium/cc/CCLayerImpl.h:
1207         (WebCore::CCLayerImpl::setDrawsContent):
1208         (WebCore::CCLayerImpl::drawsContent):
1209         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: Added.
1210         (WebCore::CCTiledLayerImpl::CCTiledLayerImpl):
1211         (WebCore::CCTiledLayerImpl::~CCTiledLayerImpl):
1212         (WebCore::CCTiledLayerImpl::draw):
1213         (WebCore::CCTiledLayerImpl::bindContentsTexture):
1214         (WebCore::CCTiledLayerImpl::dumpLayerProperties):
1215         * platform/graphics/chromium/cc/CCTiledLayerImpl.h: Added.
1216         (WebCore::CCTiledLayerImpl::create):
1217         (WebCore::CCTiledLayerImpl::setTilingTransform):
1218         (WebCore::CCTiledLayerImpl::setTiler):
1219
1220 2011-07-13  Julien Chaffraix  <jchaffraix@webkit.org>
1221
1222         Remove an unused bit in RenderObject
1223         https://bugs.webkit.org/show_bug.cgi?id=64485
1224
1225         Reviewed by Darin Adler.
1226
1227         No change in behavior so no new test.
1228
1229         * rendering/RenderObject.h: Removed a bit that was duplicated from RenderTableCell.
1230         However it was not used in RenderObject and RenderTableCell already packed this bit.
1231         We were lying in the number of used bits in RenderObject which was 33. This change
1232         brings us back to what was advertised.
1233
1234 2011-07-13  Simon Fraser  <simon.fraser@apple.com>
1235
1236         Fix non-debug builds.
1237
1238         * rendering/RenderLayerBacking.cpp:
1239         (WebCore::RenderLayerBacking::createGraphicsLayer):
1240
1241 2011-07-13  Vitaly Repeshko  <vitalyr@chromium.org>
1242
1243         [chromium] Fix mac build after r90949.
1244
1245         * bindings/v8/V8HiddenPropertyName.cpp:
1246         (WebCore::V8HiddenPropertyName::hiddenReferenceName):
1247         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
1248         (WebCore::toV8Object):
1249
1250 2011-07-13  Emil A Eklund  <eae@chromium.org>
1251
1252         Switch table rendering to to new layout types
1253         https://bugs.webkit.org/show_bug.cgi?id=64478
1254
1255         Reviewed by Eric Seidel.
1256
1257         No new tests, no new functionality.
1258
1259         * rendering/AutoTableLayout.cpp:
1260         * rendering/AutoTableLayout.h:
1261         * rendering/HitTestResult.cpp:
1262         * rendering/HitTestResult.h:
1263         * rendering/LayoutTypes.h:
1264         * rendering/RenderBlock.h:
1265         * rendering/RenderBoxModelObject.cpp:
1266         * rendering/RenderBoxModelObject.h:
1267         * rendering/RenderObject.h:
1268         * rendering/RenderTable.cpp:
1269         * rendering/RenderTable.h:
1270         * rendering/RenderTableCell.cpp:
1271         * rendering/RenderTableCell.h:
1272
1273 2011-07-13  Simon Fraser  <simon.fraser@apple.com>
1274
1275         Factor some GraphicsLayer creation code in RenderLayerBacking
1276         https://bugs.webkit.org/show_bug.cgi?id=64487
1277
1278         Reviewed by Sam Weinig.
1279
1280         Move the GraphicsLayer::create() calls into once place so that we
1281         don't have lots of #ifndef NDEBUG in various places, and can share
1282         more code in future.
1283         
1284         No behavior change, so no new tests.
1285
1286         * rendering/RenderLayerBacking.cpp:
1287         (WebCore::RenderLayerBacking::RenderLayerBacking):
1288         (WebCore::RenderLayerBacking::~RenderLayerBacking):
1289         (WebCore::RenderLayerBacking::createGraphicsLayer):
1290         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
1291         (WebCore::RenderLayerBacking::destroyGraphicsLayers):
1292         (WebCore::RenderLayerBacking::updateLayerTransform):
1293         (WebCore::RenderLayerBacking::updateClippingLayers):
1294         (WebCore::RenderLayerBacking::updateOverflowControlsLayers):
1295         (WebCore::RenderLayerBacking::updateForegroundLayer):
1296         (WebCore::RenderLayerBacking::updateMaskLayer):
1297         * rendering/RenderLayerBacking.h:
1298
1299 2011-07-13  Xan Lopez  <xlopez@igalia.com>
1300
1301         [GTK] Fix distcheck.
1302
1303         Reviewed by Martin Robinson.
1304
1305         * GNUmakefile.list.am: add missing files.
1306
1307 2011-07-13  James Robinson  <jamesr@chromium.org>
1308
1309         [chromium] No implementation defined for WTF::monotonicallyIncreasingTime
1310         https://bugs.webkit.org/show_bug.cgi?id=64420
1311
1312         Reviewed by Tony Gentilcore.
1313
1314         Removes some redundant time related code.
1315
1316         * platform/chromium/PlatformBridge.h:
1317         * platform/chromium/SystemTimeChromium.cpp:
1318         (WebCore::userIdleTime):
1319
1320 2011-07-13  Vitaly Repeshko  <vitalyr@chromium.org>
1321
1322         [V8] Avoid memory leaks with hidden references.
1323         https://bugs.webkit.org/show_bug.cgi?id=64467
1324
1325         Reviewed by Adam Barth.
1326
1327         We used to have growing arrays of hidden references associated
1328         with objects. The entries in this array had no keys and were never
1329         removed. This patch changes the interface to require a reference
1330         name. This way it's harder to leak an unbounded number of
1331         objects. Also it makes our wrapper objects one machine word
1332         smaller.
1333
1334         * bindings/scripts/CodeGeneratorV8.pm:
1335         (GenerateNormalAttrGetter): Started using new interface.
1336
1337         Interface changes:
1338         * bindings/v8/V8DOMWrapper.cpp:
1339         (WebCore::V8DOMWrapper::setNamedHiddenReference):
1340         (WebCore::V8DOMWrapper::setNamedHiddenWindowReference):
1341         * bindings/v8/V8DOMWrapper.h:
1342
1343         Added a helper to compute hidden reference names as V8 strings:
1344         * bindings/v8/V8HiddenPropertyName.cpp:
1345         (WebCore::V8HiddenPropertyName::hiddenReferenceName):
1346         * bindings/v8/V8HiddenPropertyName.h:
1347
1348         * bindings/v8/WrapperTypeInfo.h: Removed the hidden reference
1349         array internal field.
1350
1351         Update usages of hidden references:
1352         * bindings/v8/custom/V8CSSStyleSheetCustom.cpp:
1353         (WebCore::toV8):
1354         * bindings/v8/custom/V8DOMStringMapCustom.cpp:
1355         (WebCore::toV8):
1356         * bindings/v8/custom/V8DOMTokenListCustom.cpp:
1357         (WebCore::toV8):
1358         * bindings/v8/custom/V8LocationCustom.cpp:
1359         (WebCore::toV8):
1360         * bindings/v8/custom/V8MessageChannelConstructor.cpp:
1361         (WebCore::V8MessageChannel::constructorCallback):
1362         * bindings/v8/custom/V8NamedNodeMapCustom.cpp:
1363         (WebCore::toV8):
1364         * bindings/v8/custom/V8StyleSheetCustom.cpp:
1365         (WebCore::toV8):
1366         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
1367         (WebCore::toV8Object):
1368
1369         * bindings/scripts/test/V8/V8TestObj.cpp:
1370         (WebCore::TestObjInternal::readOnlyTestObjAttrAttrGetter): Updated.
1371
1372 2011-07-13  Joseph Pecoraro  <joepeck@webkit.org>
1373
1374         Improve names of some ApplicationCacheStorage accessor methods
1375         https://bugs.webkit.org/show_bug.cgi?id=64433
1376
1377         Reviewed by Alexey Proskuryakov.
1378
1379         Some methods returned a bool for success/failure and
1380         actually returned a value as an out parameter so their
1381         name was confusing. Rename these methods to make them
1382         more clear.
1383
1384         (WebCore::ApplicationCache::diskUsageForOrigin):
1385         * loader/appcache/ApplicationCacheGroup.cpp:
1386         (WebCore::ApplicationCacheGroup::recalculateAvailableSpaceInQuota):
1387         * loader/appcache/ApplicationCacheStorage.cpp:
1388         (WebCore::ApplicationCacheStorage::calculateQuotaForOrigin):
1389         (WebCore::ApplicationCacheStorage::calculateUsageForOrigin):
1390         (WebCore::ApplicationCacheStorage::calculateRemainingSizeForOriginExcludingCache):
1391         (WebCore::ApplicationCacheStorage::checkOriginQuota):
1392         * loader/appcache/ApplicationCacheStorage.h:
1393         * loader/appcache/ApplicationCache.cpp:
1394         Rename the methods.
1395
1396         * WebCore.exp.in:
1397         Replaced old versions. Also, calculateRemaining wasn't needed
1398         outside WebCore, so no longer export it.
1399
1400 2011-07-13  Joseph Pecoraro  <joepeck@webkit.org>
1401
1402         Some ApplicationCache Origin Cleanup
1403         https://bugs.webkit.org/show_bug.cgi?id=64431
1404
1405         Reviewed by Alexey Proskuryakov.
1406
1407         - m_loadedSize is inaccurate. This just replaces it with
1408         calls to ApplicationCache::estimatedSizeInStorage.
1409
1410         - m_availableSpaceInQuota can get out of date, so we just
1411         recalculate it at the start of appcache downloads.
1412
1413         * loader/appcache/ApplicationCacheGroup.h:
1414         * loader/appcache/ApplicationCacheGroup.cpp:
1415         (WebCore::ApplicationCacheGroup::ApplicationCacheGroup):
1416         (WebCore::ApplicationCacheGroup::didReceiveData):
1417         Remove references to m_loadedSize.
1418
1419         (WebCore::ApplicationCacheGroup::didFinishLoading):
1420         Replace m_loadedSize with estimatedSizeInStorage after we
1421         add the new cached resource to the cache. The calculation
1422         already happened so this check is fast.
1423
1424         (WebCore::ApplicationCacheGroup::didFinishLoadingManifest):
1425         When we start the Downloading phase, recalculate the quota
1426         so that we have an up to date quota value so that we can
1427         break early if needed.
1428
1429 2011-07-12  Brent Fulgham  <bfulgham@webkit.org>
1430
1431         Standardize WinCairo conditionalized code under PLATFORM macro.
1432         https://bugs.webkit.org/show_bug.cgi?id=64377
1433
1434         Reviewed by Maciej Stachowiak.
1435
1436         Update compile-time conditions that had previously used #ifdef
1437         of WIN_CAIRO to consistently use PLATFORM(WIN_CAIRO).
1438
1439         * WebCore.vcproj/WebCoreCairo.vsprops: Remove redundant declaration
1440           of WIN_CAIRO.
1441         * WebCore.vcproj/WebCoreDebugCairoCFLite.vsprops: Update to use
1442           the existing WinCairo.vsprops file.
1443         * WebCorePrefix.h: Update for new WTF_PLATFORM_WIN_CAIRO define.
1444         * config.h: Update to use PLATFORM(WIN_CAIRO).
1445
1446 2011-07-13  Alexandru Chiculita  <achicu@adobe.com>
1447
1448         [CSS Exclusions] Fix for comment #23 on wrap-shape parsing bug 61726
1449         https://bugs.webkit.org/show_bug.cgi?id=64464
1450
1451         Reviewed by Tony Chang.
1452
1453         No new tests needed.
1454
1455         * css/CSSParser.cpp:
1456         (WebCore::CSSParser::parseWrapShapeRect): Removed the "valid" local.
1457         (WebCore::CSSParser::parseWrapShapeCircle): Removed the "valid" local.
1458         (WebCore::CSSParser::parseWrapShapeEllipse): Removed the "valid" local.
1459         * css/CSSPrimitiveValue.cpp:
1460         * css/CSSWrapShapes.h:
1461         (WebCore::CSSWrapShapePolygon::getXAt): Replaced bit shift with multiplication.
1462         (WebCore::CSSWrapShapePolygon::getYAt): Replaced bit shift with multiplication.
1463         * rendering/style/RenderStyle.cpp:
1464         * rendering/style/StyleRareNonInheritedData.h:
1465
1466 2011-07-13  Abhishek Arya  <inferno@chromium.org>
1467
1468         Reviewed by Adam Barth.
1469
1470         Issue with Frame lifetime due to deletion in beforeload event.
1471         https://bugs.webkit.org/show_bug.cgi?id=64457
1472
1473         Copy the Frame protector higher in the stack from loadWithDocumentLoader
1474         to loadFrameRequest since any of loadPostRequest or loadURL can call
1475         loadWithDocumentLoader, thereby dispatching the beforeload event and
1476         blowing away the frame. This deleted frame will be later accessed in
1477         the loadFrameRequest function causing a crash.       
1478  
1479         Test: fast/events/form-iframe-target-before-load-crash2.html
1480
1481         * loader/FrameLoader.cpp:
1482         (WebCore::FrameLoader::loadFrameRequest):
1483         (WebCore::FrameLoader::loadWithDocumentLoader):
1484
1485 2011-07-13  Mihnea Ovidenie  <mihnea@adobe.com>
1486
1487         [CSSRegions]content:-webkit-from-flow not applied correctly
1488         https://bugs.webkit.org/show_bug.cgi?id=64438
1489
1490         Reviewed by Tony Chang.
1491
1492         Forgot to modify getStringValue(), i was modifying only getStringValue(ExceptionCode&).
1493
1494         Test: fast/regions/content-webkit-from-flow-parsing.html (existing).
1495
1496         * css/CSSPrimitiveValue.cpp:
1497         (WebCore::CSSPrimitiveValue::getStringValue):
1498
1499 2011-07-12  Ryosuke Niwa  <rniwa@webkit.org>
1500
1501         Don't reuse the last InsertTextCommand
1502         https://bugs.webkit.org/show_bug.cgi?id=64416
1503
1504         Reviewed by Justin Garcia.
1505
1506         This patch makes the interface of InsertTextCommand less foreign. It now takes arguments in
1507         its constructor and executes the command in doApply like other edit commands.
1508
1509         * editing/CompositeEditCommand.cpp:
1510         (WebCore::CompositeEditCommand::applyCommandToComposite): Added.
1511         * editing/CompositeEditCommand.h:
1512         * editing/InsertTextCommand.cpp:
1513         (WebCore::InsertTextCommand::InsertTextCommand): Takes arguments input used to take.
1514         (WebCore::InsertTextCommand::doApply): Renamed from input.
1515         * editing/InsertTextCommand.h:
1516         (WebCore::InsertTextCommand::create): Takes arguments input used to take.
1517         * editing/TypingCommand.cpp:
1518         (WebCore::TypingCommand::insertTextRunWithoutNewlines): Creates InsertTextCommand.
1519
1520 2011-07-12  Dmitry Lomov  <dslomov@google.com>
1521
1522         https://bugs.webkit.org/show_bug.cgi?id=63041
1523         [Chromium][V8] Make DOMDataStore per-isolate
1524         This patch:
1525          - makes DOMData class an utility class with static members only
1526          - adds an isolate-specific DOMDataStore in V8BindingPerIsolateData.
1527         Dromaeo benchmarks are not affected.
1528
1529         Reviewed by Adam Barth.
1530
1531         * bindings/v8/DOMData.cpp:
1532         (WebCore::getDefaultStore):
1533         (WebCore::DOMData::getCurrentStore):
1534         * bindings/v8/DOMData.h:
1535         * bindings/v8/DOMDataStore.cpp:
1536         (WebCore::DOMDataStore::DOMDataStore):
1537         (WebCore::DOMDataStore::allStores):
1538         * bindings/v8/DOMDataStore.h:
1539         * bindings/v8/ScopedDOMDataStore.cpp:
1540         (WebCore::ScopedDOMDataStore::ScopedDOMDataStore):
1541         * bindings/v8/ScopedDOMDataStore.h:
1542         * bindings/v8/StaticDOMDataStore.cpp:
1543         (WebCore::StaticDOMDataStore::StaticDOMDataStore):
1544         * bindings/v8/StaticDOMDataStore.h:
1545         * bindings/v8/V8Binding.h:
1546         (WebCore::V8BindingPerIsolateData::allStores):
1547         (WebCore::V8BindingPerIsolateData::getDOMDataStore):
1548         (WebCore::V8BindingPerIsolateData::setDOMDataStore):
1549         * bindings/v8/V8Binding.cpp:
1550         (WebCore::V8BindingPerIsolateData::V8BindingPerIsolateData):
1551         * bindings/v8/V8DOMMap.cpp:
1552         (WebCore::DOMDataStoreHandle::DOMDataStoreHandle):
1553         (WebCore::getDOMDataStore):
1554         (WebCore::enableFasterDOMStoreAccess):
1555
1556 2011-07-12  Simon Fraser  <simon.fraser@apple.com>
1557
1558         Rename compositing-related updateContentsScale() methods
1559         https://bugs.webkit.org/show_bug.cgi?id=64430
1560
1561         Reviewed by Joseph Pecoraro.
1562
1563         Rename updateContentsScale() to something less presumptuous; layers may choose
1564         to do something other than update their contents scale when the page scale factor
1565         changes. pageScaleFactorChanged() is a better name.
1566
1567         * page/Frame.cpp:
1568         (WebCore::Frame::pageScaleFactorChanged):
1569         (WebCore::Frame::scalePage):
1570         * page/Frame.h:
1571         * rendering/RenderLayer.cpp:
1572         (WebCore::RenderLayer::pageScaleFactorChanged):
1573         * rendering/RenderLayer.h:
1574         * rendering/RenderLayerBacking.cpp:
1575         (WebCore::RenderLayerBacking::pageScaleFactorChanged):
1576         * rendering/RenderLayerBacking.h:
1577         * rendering/RenderLayerCompositor.cpp:
1578         (WebCore::RenderLayerCompositor::pageScaleFactorChanged):
1579         * rendering/RenderLayerCompositor.h:
1580
1581 2011-07-13  Pierre Rossi  <pierre.rossi@gmail.com>
1582
1583         Fix compile for QRawFont.
1584
1585         https://bugs.webkit.org/show_bug.cgi?id=64453
1586
1587         Reviewed by Andreas Kling.
1588
1589         * platform/graphics/GraphicsContext.h:
1590         * platform/graphics/qt/FontQt.cpp:
1591         (WebCore::Font::drawGlyphs):
1592
1593 2011-07-13  John Knottenbelt  <jknotten@chromium.org>
1594
1595         Reference Geolocation object from GeoNotifier and Geolocation::setIsAllowed.
1596         https://bugs.webkit.org/show_bug.cgi?id=64363
1597
1598         Reviewed by Tony Gentilcore.
1599
1600         Test: fast/dom/Geolocation/remove-remote-context-in-error-callback-crash.html
1601
1602         * page/Geolocation.cpp:
1603         (WebCore::Geolocation::setIsAllowed):
1604         * page/Geolocation.h:
1605
1606 2011-07-13  Vsevolod Vlasov  <vsevik@chromium.org>
1607
1608         Web Inspector: Network panel search needs each resource to have unique identifier.
1609         https://bugs.webkit.org/show_bug.cgi?id=64287
1610
1611         Reviewed by Pavel Feldman.
1612
1613         * inspector/front-end/NetworkManager.js:
1614         (WebInspector.NetworkManager.prototype.requestContent):
1615         (WebInspector.NetworkDispatcher):
1616         (WebInspector.NetworkDispatcher.prototype.requestWillBeSent):
1617         (WebInspector.NetworkDispatcher.prototype.resourceLoadedFromMemoryCache):
1618         (WebInspector.NetworkDispatcher.prototype._appendRedirect):
1619         * inspector/front-end/NetworkPanel.js:
1620         (WebInspector.NetworkPanel.prototype._appendResource):
1621         (WebInspector.NetworkPanel.prototype._frameNavigated):
1622         (WebInspector.NetworkPanel.prototype._updateSearchMatchedListAfterResourceIdentifierChanged):
1623
1624 2011-07-13  Alexandru Chiculita  <achicu@adobe.com>
1625
1626         Bridge RenderBoxModelObject::calculateBackgroundImageGeometry parameters into a class
1627         https://bugs.webkit.org/show_bug.cgi?id=63987
1628
1629         Reviewed by Hajime Morita.
1630
1631         Change doesn't add new functionality. No test needed.
1632
1633         * rendering/RenderBox.cpp:
1634         (WebCore::RenderBox::maskClipRect):
1635         (WebCore::RenderBox::repaintLayerRectsForImage):
1636         * rendering/RenderBoxModelObject.cpp:
1637         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
1638         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setNoRepeatX):
1639         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setNoRepeatY):
1640         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::useFixedAttachment):
1641         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::clip):
1642         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::relativePhase):
1643         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
1644         * rendering/RenderBoxModelObject.h:
1645         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::destOrigin):
1646         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setDestOrigin):
1647         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::destRect):
1648         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setDestRect):
1649         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::phase):
1650         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setPhase):
1651         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::tileSize):
1652         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setTileSize):
1653         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setPhaseX):
1654         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setPhaseY):
1655
1656 2011-07-13  MORITA Hajime  <morrita@google.com>
1657
1658         Refactoring: Ignored ExceptionCode value should be less annoying.
1659         https://bugs.webkit.org/show_bug.cgi?id=63688
1660
1661         - Introduced ExceptionCodePlaceholder class for the default parameter of ExceptionCode.
1662         - Introduced ASSERT_NO_EXCEPTION to check ExceptionCode not set to non-zero after the call.
1663         - Adopted ASSERT_NO_EXCEPTION in Range.cpp
1664
1665         No new tests. No behaviour change.
1666
1667         Reviewed by Darin Adler.
1668
1669         * GNUmakefile.list.am:
1670         * WebCore.gypi:
1671         * WebCore.xcodeproj/project.pbxproj:
1672         * dom/ExceptionCodePlaceholder.h: Added.
1673         (WebCore::ExceptionCodePlaceholder::ExceptionCodePlaceholder):
1674         (WebCore::ExceptionCodePlaceholder::operator ExceptionCode& ):
1675         (WebCore::IgnorableExceptionCode::IgnorableExceptionCode):
1676         (WebCore::CheckedExceptionCode::CheckedExceptionCode):
1677         (WebCore::CheckedExceptionCode::~CheckedExceptionCode):
1678         * dom/Range.cpp:
1679         (WebCore::Range::Range):
1680         (WebCore::Range::editingStartPosition):
1681         * dom/Range.h:        
1682
1683 2011-07-13  Nikolas Zimmermann  <nzimmermann@rim.com>
1684
1685         Regression: OOB read in svg text run
1686         https://bugs.webkit.org/show_bug.cgi?id=63627
1687
1688         Not reviewed.
1689
1690         Fixed last minute typo leading to assertions.
1691
1692         * rendering/InlineTextBox.cpp:
1693         (WebCore::InlineTextBox::paintSelection):
1694
1695 2011-07-12  Andrey Kosyakov  <caseq@chromium.org>
1696
1697         Web Inspector: factor NetworkLogView out of Network panel
1698         https://bugs.webkit.org/show_bug.cgi?id=64366
1699
1700         Reviewed by Pavel Feldman.
1701
1702         * inspector/front-end/NetworkPanel.js:
1703         (WebInspector.NetworkLogView):
1704         (WebInspector.NetworkLogView.prototype.get useLargeRows):
1705         (WebInspector.NetworkLogView.prototype.set allowPopover):
1706         (WebInspector.NetworkLogView.prototype.elementsToRestoreScrollPositionsFor):
1707         (WebInspector.NetworkLogView.prototype.resize):
1708         (WebInspector.NetworkLogView.prototype._createTable):
1709         (WebInspector.NetworkLogView.prototype.show):
1710         (WebInspector.NetworkLogView.prototype.hide):
1711         (WebInspector.NetworkLogView.prototype._reset):
1712         (WebInspector.NetworkLogView.prototype.switchToDetailedView):
1713         (WebInspector.NetworkLogView.prototype.switchToBriefView):
1714         (WebInspector.NetworkLogView.prototype.get _setLargerResources):
1715         (WebInspector.NetworkLogView.prototype._getPopoverAnchor):
1716         (WebInspector.NetworkPanel):
1717         (WebInspector.NetworkPanel.prototype.get toolbarItemLabel):
1718         (WebInspector.NetworkPanel.prototype.get statusBarItems):
1719         (WebInspector.NetworkPanel.prototype.elementsToRestoreScrollPositionsFor):
1720         (WebInspector.NetworkPanel.prototype.resize):
1721         (WebInspector.NetworkPanel.prototype._reset):
1722         (WebInspector.NetworkPanel.prototype.updateSidebarWidth):
1723         (WebInspector.NetworkPanel.prototype.updateMainViewWidth):
1724         (WebInspector.NetworkPanel.prototype.handleShortcut):
1725         (WebInspector.NetworkPanel.prototype.show):
1726         (WebInspector.NetworkPanel.prototype.hide):
1727         (WebInspector.NetworkPanel.prototype.get resources):
1728         (WebInspector.NetworkPanel.prototype.resourceById):
1729         (WebInspector.NetworkPanel.prototype.canShowAnchorLocation):
1730         (WebInspector.NetworkPanel.prototype.showAnchorLocation):
1731         (WebInspector.NetworkPanel.prototype._onViewCleared):
1732         (WebInspector.NetworkPanel.prototype._onRowSizeChanged):
1733         (WebInspector.NetworkPanel.prototype._onResourceSelected):
1734         (WebInspector.NetworkPanel.prototype._showResource):
1735         (WebInspector.NetworkPanel.prototype._closeVisibleResource):
1736         (WebInspector.NetworkPanel.prototype._toggleGridMode):
1737         (WebInspector.NetworkPanel.prototype._toggleViewingResourceMode):
1738         (WebInspector.NetworkPanel.prototype.performSearch):
1739         (WebInspector.NetworkPanel.prototype.jumpToPreviousSearchResult):
1740         (WebInspector.NetworkPanel.prototype.jumpToNextSearchResult):
1741         (WebInspector.NetworkPanel.prototype.searchCanceled):
1742         (WebInspector.NetworkDataGridNode):
1743         (WebInspector.NetworkDataGridNode.prototype.isFilteredOut):
1744         (WebInspector.NetworkDataGridNode.prototype.select):
1745         (WebInspector.NetworkDataGridNode.prototype.get selectable):
1746
1747 2011-07-13  Sheriff Bot  <webkit.review.bot@gmail.com>
1748
1749         Unreviewed, rolling out r90634.
1750         http://trac.webkit.org/changeset/90634
1751         https://bugs.webkit.org/show_bug.cgi?id=64448
1752
1753         Qt HTTP Pipelining is not robust enough to be used in that
1754         generic way. (Requested by benjaminp on #webkit).
1755
1756         * platform/network/qt/ResourceRequestQt.cpp:
1757         (WebCore::ResourceRequest::toNetworkRequest):
1758
1759 2011-07-13  Nikolas Zimmermann  <nzimmermann@rim.com>
1760
1761         Regression: OOB read in svg text run
1762         https://bugs.webkit.org/show_bug.cgi?id=63627
1763
1764         Reviewed by Zoltan Herczeg.
1765
1766         A TextRun is constructed for a portion of a string [a,b] whose original length is c (0 < a < b < c).
1767         The TextRun charactersLength variable stores the length of the remaining text from (b..c) in order
1768         to support ligatures in SVG Fonts. Example: <text>ffl</text>. When measuring the advance from char 0
1769         to char 1 the whole 'ffl' text must be passed to the SVG glyph selection code, as the SVG Font may
1770         define a single glyph for the characters 'ffl' thus leading to a single character long text
1771         pointing to the ffl ligature, not three individual 'f' / 'f' / 'l' characters anymore.
1772
1773         constructTextRun(..const UChar*, int length, ..) did not correctly calculate the maximum length (b..c).
1774         The passed in UChar buffer starts at eg. textRenderer->characters() + start(), and following condition
1775         holds true for 'length': start() + length <= textRenderer->textLength() (which denotes the maximum length
1776         of the textRenderer->characters() buffer). We have to keep track of the start() offset, so that we
1777         can calculate the charactersLength for the TextRun correctly: textRenderer->textLength() - start().
1778
1779         There are also other cases like RenderCombinedText and/or the presence of hyphens that were incorrectly
1780         tracked. Only InlineTextBox had to be fixed, the other callsites in eg. RenderBlockLineLayout already
1781         computed the maximum length correctly - I assured this by valgrind runs on all SVG Font tests.
1782
1783         * rendering/InlineTextBox.cpp:
1784         (WebCore::InlineTextBox::paint):
1785         (WebCore::InlineTextBox::paintSelection):
1786         (WebCore::InlineTextBox::constructTextRun): Add maximumLength parameter to constructTextRun.
1787         * rendering/InlineTextBox.h: Ditto.
1788
1789 2011-07-12  Antti Koivisto  <antti@apple.com>
1790
1791         didFirstVisuallyNonEmptyLayout dispatched too early
1792         https://bugs.webkit.org/show_bug.cgi?id=64412
1793
1794         Reviewed by Darin Adler and Sam Weinig.
1795
1796         Improve the mechanism that dispatches didFirstVisuallyNonEmptyLayout
1797
1798         - Wait until a threshold of characters and pixels has been exceeded before dispatching.
1799         - Wait until stylesheets are loaded (painting is disabled in this case).
1800
1801         * page/FrameView.cpp:
1802         (WebCore::FrameView::reset):
1803         (WebCore::FrameView::performPostLayoutTasks):
1804         * page/FrameView.h:
1805         (WebCore::FrameView::incrementVisuallyNonEmptyCharacterCount):
1806         (WebCore::FrameView::incrementVisuallyNonEmptyPixelCount):
1807         * rendering/RenderImage.cpp:
1808         (WebCore::RenderImage::RenderImage):
1809         (WebCore::RenderImage::imageChanged):
1810         * rendering/RenderImage.h:
1811         * rendering/RenderText.cpp:
1812         (WebCore::RenderText::RenderText):
1813
1814 2011-07-12  MORITA Hajime  <morrita@google.com>
1815
1816         [Refactoring][ShadowContentElement] Forwarded node list should be a linked-list.
1817         https://bugs.webkit.org/show_bug.cgi?id=64252
1818
1819         Reviewed by Dimitri Glazkov.
1820
1821         Introduced ShadowInclusionList and ShadowInclusion for maintaining
1822         forwarded content children. ShadowInclusion is doubly-linked list.
1823         ShadowContentElement::m_inclusions is replaced by ShadowInclusionList.
1824         
1825         This change is a prepration for bug 64251, which will introduce
1826         forwarded-children to content-element table.
1827         
1828         No new tests. No behavioral change.
1829
1830         * dom/NodeRenderingContext.cpp:
1831         (WebCore::nextRendererOf):
1832         (WebCore::previousRendererOf):
1833         (WebCore::firstRendererOf):
1834         (WebCore::lastRendererOf):
1835         * dom/ShadowContentElement.cpp:
1836         (WebCore::ShadowInclusion::append):
1837         (WebCore::ShadowInclusion::unlink):
1838         (WebCore::ShadowInclusionList::ShadowInclusionList):
1839         (WebCore::ShadowInclusionList::~ShadowInclusionList):
1840         (WebCore::ShadowInclusionList::find):
1841         (WebCore::ShadowInclusionList::clear):
1842         (WebCore::ShadowInclusionList::append):
1843         (WebCore::ShadowContentElement::attach):
1844         * dom/ShadowContentElement.h:
1845         (WebCore::ShadowInclusion::includer):
1846         (WebCore::ShadowInclusion::content):
1847         (WebCore::ShadowInclusion::next):
1848         (WebCore::ShadowInclusion::previous):
1849         (WebCore::ShadowInclusion::ShadowInclusion):
1850         (WebCore::ShadowInclusion::create):
1851         (WebCore::ShadowInclusionList::first):
1852         (WebCore::ShadowInclusionList::last):
1853         (WebCore::ShadowInclusionList::isEmpty):
1854         (WebCore::ShadowInclusionList::append):
1855         (WebCore::ShadowContentElement::inclusions):
1856         * dom/ShadowContentSelector.cpp:
1857         (WebCore::ShadowContentSelector::selectInclusion):
1858         * dom/ShadowContentSelector.h:
1859
1860 2011-07-12  David Reveman  <reveman@chromium.org>
1861
1862         [Chromium] Use nearest filter method with pixel aligned transforms.
1863         https://bugs.webkit.org/show_bug.cgi?id=64338
1864
1865         Reviewed by James Robinson.
1866
1867         Check for integer translation and use nearest texture filter when
1868         possible to avoid filter precisions problems at the layer edges.
1869
1870         Test: compositing/iframes/nested-iframe-scrolling.html (existing)
1871
1872         * platform/graphics/chromium/LayerTilerChromium.cpp:
1873         (WebCore::LayerTilerChromium::drawTiles):
1874         * platform/graphics/transforms/TransformationMatrix.cpp:
1875         (WebCore::TransformationMatrix::isIntegerTranslation):
1876         * platform/graphics/transforms/TransformationMatrix.h:
1877
1878 2011-07-12  David Reveman  <reveman@chromium.org>
1879
1880         Removed unnecessary function parameters from TilingData::textureOffset.
1881         https://bugs.webkit.org/show_bug.cgi?id=64245
1882
1883         Reviewed by Brent Fulgham.
1884
1885         No new tests, no functionality changes.
1886
1887         * platform/graphics/chromium/LayerTilerChromium.cpp:
1888         (WebCore::LayerTilerChromium::drawTiles):
1889         * platform/graphics/gpu/TilingData.cpp:
1890         (WebCore::TilingData::textureOffset):
1891         * platform/graphics/gpu/TilingData.h:
1892
1893 2011-07-12  Ryosuke Niwa  <rniwa@webkit.org>
1894
1895         Move RenderTextControl::indexForVisiblePosition to HTMLTextFormControlElement
1896         https://bugs.webkit.org/show_bug.cgi?id=64403
1897
1898         Reviewed by Hajime Morita.
1899
1900         Moved indexForVisiblePosition from RenderTextControl to HTMLTextFormControlElement.
1901
1902         Also replaced the call to RenderTextControl::isSelectableElement by a call to enclosingTextFormControl
1903         (moved from htmlediting to HTMLTextFormControlElement) because we are only interested in checking
1904         whether the given position is inside the current text form control or not.
1905
1906         In addition, modernized the code in indexForVisiblePosition by calling parentAnchoredEquivalent on the
1907         given position and replacing calls to deprecateNode and deprecatedEditingOffset by calls to containerNode
1908         and offsetInContainer.
1909
1910         * accessibility/AccessibilityRenderObject.cpp:
1911         (WebCore::AccessibilityRenderObject::indexForVisiblePosition): Calls indexForVisiblePosition.
1912         * editing/htmlediting.cpp: Removed enclosingTextFromControl.
1913         * editing/htmlediting.h: Removed enclosingTextFromControl.
1914         * html/HTMLTextFormControlElement.cpp:
1915         (WebCore::HTMLTextFormControlElement::indexForVisiblePosition): Moved from RenderTextControl.
1916         (WebCore::HTMLTextFormControlElement::computeSelectionStart): Calls indexForVisiblePosition.
1917         (WebCore::HTMLTextFormControlElement::computeSelectionEnd): Calls indexForVisiblePosition.
1918         (WebCore::enclosingTextFormControl): Moved from htmlediting.cpp
1919         * html/HTMLTextFormControlElement.h:
1920         * rendering/RenderTextControl.cpp:
1921         * rendering/RenderTextControl.h:
1922
1923 2011-07-12  Julien Chaffraix  <jchaffraix@webkit.org>
1924
1925         Make RenderObject::containingBlock virtual for better speed and clarity
1926         https://bugs.webkit.org/show_bug.cgi?id=64318
1927
1928         Reviewed by Darin Adler.
1929
1930         No new tests, performance refactoring.
1931
1932         On some of my test cases, this method takes between 3 and 5% of the time spend.
1933         The method makes 2 calls to virtual methods which could be moved to their overriden
1934         version of containingBlock if we made it virtual.
1935
1936         That's what this patch does. It saves between 1 and 2% on some synthetic test cases
1937         as well as made the current method shorter.
1938
1939         * rendering/RenderObject.cpp:
1940         (WebCore::RenderObject::containingBlock): Removed code for RenderView and RenderTableCell,
1941         replaced by ASSERTs.
1942
1943         * rendering/RenderObject.h: Made containingBlock virtual.
1944
1945         * rendering/RenderTableCell.h:
1946         (WebCore::RenderTableCell::containingBlock):
1947         * rendering/RenderView.h:
1948         (WebCore::RenderView::containingBlock):
1949         The code moved from RenderObject is inlined in those 2 methods.
1950
1951 2011-07-12  James Robinson  <jamesr@chromium.org>
1952
1953         [chromium] Chromium win build fix.
1954
1955         * platform/graphics/chromium/FontChromiumWin.cpp:
1956         (WebCore::drawGlyphsWin):
1957
1958 2011-07-12  Pratik Solanki  <psolanki@apple.com>
1959
1960         Get webkit to compile with USE(CFNETWORK) enabled on Mac
1961         https://bugs.webkit.org/show_bug.cgi?id=63674
1962
1963         Reviewed by David Kilzer.
1964
1965         Changes to ResourceHandle class to get it to compile with USE(CFNETWORK).
1966
1967         No new tests because no change in functionality and option is not enabled on Mac.
1968
1969         * platform/network/ResourceHandle.h:
1970         * platform/network/ResourceHandleInternal.h:
1971         * platform/network/cf/ResourceHandleCFNet.cpp:
1972         (WebCore::didReceiveResponse):
1973         (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
1974         (WebCore::ResourceHandle::start):
1975         (WebCore::WebCoreSynchronousLoaderClient::willSendRequest): Call adjustMIMETypeIfNecessary
1976         on Mac. Also port over fix for <rdar://problem/6901522> added in r43993 which forces the
1977         MIME type to text/html if the request is annotated with a "ForceHTMLMIMEType" property.
1978
1979 2011-07-12  James Robinson  <jamesr@chromium.org>
1980
1981         [chromium] Delete the unused legacy accelerated canvas 2d code
1982         https://bugs.webkit.org/show_bug.cgi?id=64214
1983
1984         Reviewed by Stephen White.
1985
1986         This removes the legacy accelerated canvas 2d path and support logic since we (chromium) are no longer using
1987         this codepath and it seems clear that no other port is interested.
1988
1989         Refactoring and removing unused code, so no new tests.
1990
1991         * WebCore.gypi:
1992         * WebCore.xcodeproj/project.pbxproj:
1993         * html/canvas/CanvasRenderingContext2D.cpp:
1994         (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D):
1995         (WebCore::CanvasRenderingContext2D::setGlobalCompositeOperation):
1996         (WebCore::CanvasRenderingContext2D::didDraw):
1997         * html/canvas/CanvasRenderingContext2D.h:
1998         * loader/EmptyClients.h:
1999         * page/ChromeClient.h:
2000         * page/Page.cpp:
2001         (WebCore::Page::sharedGraphicsContext3D):
2002         * page/Page.h:
2003         * platform/graphics/GraphicsContext.cpp:
2004         (WebCore::GraphicsContext::setSharedGraphicsContext3D):
2005         (WebCore::GraphicsContext::syncSoftwareCanvas):
2006         * platform/graphics/GraphicsContext.h:
2007         * platform/graphics/GraphicsContext3D.h:
2008         * platform/graphics/chromium/DrawingBufferChromium.cpp:
2009         (WebCore::DrawingBuffer::setGrContext):
2010         * platform/graphics/chromium/FontLinux.cpp:
2011         (WebCore::Font::drawGlyphs):
2012         * platform/graphics/chromium/cc/CCLayerSorter.cpp:
2013         (WebCore::pointInTriangle):
2014         * platform/graphics/gpu/BicubicShader.cpp: Removed.
2015         * platform/graphics/gpu/BicubicShader.h: Removed.
2016         * platform/graphics/gpu/ConvolutionShader.cpp: Removed.
2017         * platform/graphics/gpu/ConvolutionShader.h: Removed.
2018         * platform/graphics/gpu/GraphicsContextGPU.cpp: Removed.
2019         * platform/graphics/gpu/GraphicsContextGPU.h: Removed.
2020         * platform/graphics/gpu/SharedGraphicsContext3D.cpp: Removed.
2021         * platform/graphics/gpu/SharedGraphicsContext3D.h: Removed.
2022         * platform/graphics/gpu/SolidFillShader.cpp: Removed.
2023         * platform/graphics/gpu/SolidFillShader.h: Removed.
2024         * platform/graphics/gpu/TexShader.cpp: Removed.
2025         * platform/graphics/gpu/TexShader.h: Removed.
2026         * platform/graphics/skia/GraphicsContextSkia.cpp:
2027         (WebCore::GraphicsContext::savePlatformState):
2028         (WebCore::GraphicsContext::restorePlatformState):
2029         (WebCore::GraphicsContext::addInnerRoundedRectClip):
2030         (WebCore::GraphicsContext::clearRect):
2031         (WebCore::GraphicsContext::clip):
2032         (WebCore::GraphicsContext::canvasClip):
2033         (WebCore::GraphicsContext::clipOut):
2034         (WebCore::GraphicsContext::clipPath):
2035         (WebCore::GraphicsContext::concatCTM):
2036         (WebCore::GraphicsContext::setCTM):
2037         (WebCore::GraphicsContext::drawConvexPolygon):
2038         (WebCore::GraphicsContext::drawEllipse):
2039         (WebCore::GraphicsContext::drawFocusRing):
2040         (WebCore::GraphicsContext::drawLine):
2041         (WebCore::GraphicsContext::drawLineForTextChecking):
2042         (WebCore::GraphicsContext::drawLineForText):
2043         (WebCore::GraphicsContext::drawRect):
2044         (WebCore::GraphicsContext::fillPath):
2045         (WebCore::GraphicsContext::fillRect):
2046         (WebCore::GraphicsContext::fillRoundedRect):
2047         (WebCore::GraphicsContext::scale):
2048         (WebCore::GraphicsContext::setAlpha):
2049         (WebCore::GraphicsContext::setPlatformCompositeOperation):
2050         (WebCore::GraphicsContext::setPlatformFillColor):
2051         (WebCore::GraphicsContext::setPlatformShadow):
2052         (WebCore::GraphicsContext::strokeArc):
2053         (WebCore::GraphicsContext::strokePath):
2054         (WebCore::GraphicsContext::strokeRect):
2055         (WebCore::GraphicsContext::rotate):
2056         (WebCore::GraphicsContext::translate):
2057         (WebCore::GraphicsContext::setSharedGraphicsContext3D):
2058         (WebCore::GraphicsContext::syncSoftwareCanvas):
2059         * platform/graphics/skia/ImageBufferSkia.cpp:
2060         (WebCore::ImageBuffer::copyImage):
2061         (WebCore::ImageBuffer::draw):
2062         (WebCore::ImageBuffer::getUnmultipliedImageData):
2063         (WebCore::ImageBuffer::getPremultipliedImageData):
2064         (WebCore::ImageBuffer::putUnmultipliedImageData):
2065         (WebCore::ImageBuffer::putPremultipliedImageData):
2066         * platform/graphics/skia/ImageSkia.cpp:
2067         (WebCore::BitmapImage::draw):
2068         (WebCore::BitmapImageSingleFrameSkia::draw):
2069         * platform/graphics/skia/NativeImageSkia.cpp:
2070         (WebCore::NativeImageSkia::~NativeImageSkia):
2071         * platform/graphics/skia/PlatformContextSkia.cpp:
2072         (WebCore::PlatformContextSkia::PlatformContextSkia):
2073         (WebCore::PlatformContextSkia::~PlatformContextSkia):
2074         (WebCore::PlatformContextSkia::setSharedGraphicsContext3D):
2075         (WebCore::PlatformContextSkia::makeGrContextCurrent):
2076         * platform/graphics/skia/PlatformContextSkia.h:
2077
2078 2011-07-12  Emil A Eklund  <eae@chromium.org>
2079
2080         Switch InlineFlowBox to to new layout types
2081         https://bugs.webkit.org/show_bug.cgi?id=64399
2082
2083         Reviewed by Eric Seidel.
2084
2085         First step in moving floats over to the new layout abstraction.
2086
2087         No new tests, no new functionality.
2088
2089         * rendering/InlineBox.cpp:
2090         (WebCore::InlineBox::logicalHeight):
2091         * rendering/InlineBox.h:
2092         (WebCore::InlineBox::logicalTop):
2093         (WebCore::InlineBox::logicalBottom):
2094         (WebCore::InlineBox::setLogicalTop):
2095         * rendering/InlineFlowBox.cpp:
2096         (WebCore::InlineFlowBox::adjustMaxAscentAndDescent):
2097         (WebCore::InlineFlowBox::computeLogicalBoxHeights):
2098         (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
2099         (WebCore::InlineFlowBox::addBoxShadowVisualOverflow):
2100         (WebCore::InlineFlowBox::addTextBoxVisualOverflow):
2101         (WebCore::InlineFlowBox::addReplacedChildOverflow):
2102         (WebCore::InlineFlowBox::constrainToLineTopAndBottomIfNeeded):
2103         (WebCore::InlineFlowBox::computeOverAnnotationAdjustment):
2104         (WebCore::InlineFlowBox::computeUnderAnnotationAdjustment):
2105         * rendering/InlineFlowBox.h:
2106         * rendering/RenderBlock.cpp:
2107         (WebCore::RenderBlock::logicalRightSelectionGap):
2108         * rendering/RenderBlock.h:
2109         * rendering/RootInlineBox.cpp:
2110         (WebCore::RootInlineBox::alignBoxesInBlockDirection):
2111         (WebCore::RootInlineBox::lineSelectionGap):
2112         (WebCore::RootInlineBox::ascentAndDescentForBox):
2113         (WebCore::RootInlineBox::verticalPositionForBox):
2114         * rendering/RootInlineBox.h:
2115         * rendering/style/RenderStyle.cpp:
2116         (WebCore::RenderStyle::getShadowExtent):
2117         (WebCore::RenderStyle::getShadowHorizontalExtent):
2118         (WebCore::RenderStyle::getShadowVerticalExtent):
2119         * rendering/style/RenderStyle.h:
2120         (WebCore::InheritedFlags::getTextShadowExtent):
2121         (WebCore::InheritedFlags::getTextShadowHorizontalExtent):
2122         (WebCore::InheritedFlags::getTextShadowVerticalExtent):
2123         (WebCore::InheritedFlags::getTextShadowInlineDirectionExtent):
2124         (WebCore::InheritedFlags::getTextShadowBlockDirectionExtent):
2125         (WebCore::InheritedFlags::getBoxShadowExtent):
2126         (WebCore::InheritedFlags::getBoxShadowHorizontalExtent):
2127         (WebCore::InheritedFlags::getBoxShadowVerticalExtent):
2128         (WebCore::InheritedFlags::getBoxShadowInlineDirectionExtent):
2129         (WebCore::InheritedFlags::getBoxShadowBlockDirectionExtent):
2130         (WebCore::InheritedFlags::getShadowInlineDirectionExtent):
2131         (WebCore::InheritedFlags::getShadowBlockDirectionExtent):
2132         * rendering/style/ShadowData.cpp:
2133         (WebCore::calculateShadowExtent):
2134         (WebCore::ShadowData::adjustRectForShadow):
2135         * rendering/style/ShadowData.h:
2136         (WebCore::ShadowData::ShadowData):
2137         (WebCore::ShadowData::x):
2138         (WebCore::ShadowData::y):
2139
2140 2011-07-12  Kenichi Ishibashi  <bashi@chromium.org>
2141
2142         [Chromium] SVG text is not rendered sometimes with geometricPrecision
2143         https://bugs.webkit.org/show_bug.cgi?id=64341
2144
2145         Changing the type of x and y offsets of ComplexTextControllerLinux to make it possible to treat negative offsets.
2146
2147         Reviewed by Tony Chang.
2148
2149         Test: platform/chromium-linux/svg/text/text-with-geometric-precision.svg
2150
2151         * platform/graphics/chromium/ComplexTextControllerLinux.cpp: Changed the type of m_offsetX and m_startingY from unsigned to int.
2152         (WebCore::ComplexTextController::ComplexTextController): Changed the type of the argument.
2153         (WebCore::ComplexTextController::reset): Ditto.
2154         * platform/graphics/chromium/ComplexTextControllerLinux.h:
2155
2156 2011-07-12  Alexandru Chiculita  <achicu@adobe.com>
2157
2158         Reviewed by David Hyatt.
2159
2160         [CSS Exclusions] Parse wrap-shape property
2161         https://bugs.webkit.org/show_bug.cgi?id=61726
2162
2163         Parsing wrap-shape: rect, circle, ellipse and polygon.
2164         Moved WindRule from Path.h to it's own file.
2165
2166         Test: fast/exclusions/parsing-wrap-shape.html
2167
2168         * WebCore.vcproj/WebCore.vcproj:
2169         * WebCore.xcodeproj/project.pbxproj:
2170         * css/CSSComputedStyleDeclaration.cpp:
2171         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2172         * css/CSSParser.cpp:
2173         (WebCore::CSSParser::parseValue):
2174         (WebCore::CSSParser::parseWrapShapeRect):
2175         (WebCore::CSSParser::parseWrapShapeCircle):
2176         (WebCore::CSSParser::parseWrapShapeEllipse):
2177         (WebCore::CSSParser::parseWrapShapePolygon):
2178         (WebCore::CSSParser::parseWrapShape):
2179         * css/CSSParser.h:
2180         * css/CSSPrimitiveValue.cpp:
2181         (WebCore::CSSPrimitiveValue::init):
2182         (WebCore::CSSPrimitiveValue::cleanup):
2183         (WebCore::CSSPrimitiveValue::cssText):
2184         * css/CSSPrimitiveValue.h:
2185         (WebCore::CSSPrimitiveValue::getShapeValue):
2186         * css/CSSPropertyNames.in:
2187         * css/CSSStyleSelector.cpp:
2188         (WebCore::CSSStyleSelector::applyProperty):
2189         * css/CSSValueKeywords.in:
2190         * css/CSSWrapShapes.cpp: Added.
2191         (WebCore::CSSWrapShapeRect::cssText):
2192         (WebCore::CSSWrapShapeCircle::cssText):
2193         (WebCore::CSSWrapShapeEllipse::cssText):
2194         (WebCore::CSSWrapShapePolygon::cssText):
2195         * css/CSSWrapShapes.h: Added.
2196         (WebCore::CSSWrapShape::~CSSWrapShape):
2197         (WebCore::CSSWrapShape::CSSWrapShape):
2198         (WebCore::CSSWrapShapeRect::create):
2199         (WebCore::CSSWrapShapeRect::left):
2200         (WebCore::CSSWrapShapeRect::top):
2201         (WebCore::CSSWrapShapeRect::width):
2202         (WebCore::CSSWrapShapeRect::height):
2203         (WebCore::CSSWrapShapeRect::radiusX):
2204         (WebCore::CSSWrapShapeRect::radiusY):
2205         (WebCore::CSSWrapShapeRect::setLeft):
2206         (WebCore::CSSWrapShapeRect::setTop):
2207         (WebCore::CSSWrapShapeRect::setWidth):
2208         (WebCore::CSSWrapShapeRect::setHeight):
2209         (WebCore::CSSWrapShapeRect::setRadiusX):
2210         (WebCore::CSSWrapShapeRect::setRadiusY):
2211         (WebCore::CSSWrapShapeRect::type):
2212         (WebCore::CSSWrapShapeRect::CSSWrapShapeRect):
2213         (WebCore::CSSWrapShapeCircle::create):
2214         (WebCore::CSSWrapShapeCircle::left):
2215         (WebCore::CSSWrapShapeCircle::top):
2216         (WebCore::CSSWrapShapeCircle::radius):
2217         (WebCore::CSSWrapShapeCircle::setLeft):
2218         (WebCore::CSSWrapShapeCircle::setTop):
2219         (WebCore::CSSWrapShapeCircle::setRadius):
2220         (WebCore::CSSWrapShapeCircle::type):
2221         (WebCore::CSSWrapShapeCircle::CSSWrapShapeCircle):
2222         (WebCore::CSSWrapShapeEllipse::create):
2223         (WebCore::CSSWrapShapeEllipse::left):
2224         (WebCore::CSSWrapShapeEllipse::top):
2225         (WebCore::CSSWrapShapeEllipse::radiusX):
2226         (WebCore::CSSWrapShapeEllipse::radiusY):
2227         (WebCore::CSSWrapShapeEllipse::setLeft):
2228         (WebCore::CSSWrapShapeEllipse::setTop):
2229         (WebCore::CSSWrapShapeEllipse::setRadiusX):
2230         (WebCore::CSSWrapShapeEllipse::setRadiusY):
2231         (WebCore::CSSWrapShapeEllipse::type):
2232         (WebCore::CSSWrapShapeEllipse::CSSWrapShapeEllipse):
2233         (WebCore::CSSWrapShapePolygon::create):
2234         (WebCore::CSSWrapShapePolygon::appendPoint):
2235         (WebCore::CSSWrapShapePolygon::getXAt):
2236         (WebCore::CSSWrapShapePolygon::getYAt):
2237         (WebCore::CSSWrapShapePolygon::setWindRule):
2238         (WebCore::CSSWrapShapePolygon::windRule):
2239         (WebCore::CSSWrapShapePolygon::type):
2240         (WebCore::CSSWrapShapePolygon::CSSWrapShapePolygon):
2241         * css/SVGCSSValueKeywords.in:
2242         * platform/graphics/Path.h:
2243         * platform/graphics/WindRule.h: Added.
2244         * rendering/style/RenderStyle.cpp:
2245         (WebCore::RenderStyle::diff):
2246         * rendering/style/RenderStyle.h:
2247         (WebCore::InheritedFlags::setWrapShape):
2248         (WebCore::InheritedFlags::wrapShape):
2249         (WebCore::InheritedFlags::initialWrapShape):
2250         * rendering/style/StyleRareNonInheritedData.cpp:
2251         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2252         (WebCore::StyleRareNonInheritedData::operator==):
2253         * rendering/style/StyleRareNonInheritedData.h:
2254
2255 2011-07-12  Simon Fraser  <simon.fraser@apple.com>
2256
2257         Clean up some RenderLayerCompositor code relating to scroll and root layers
2258         https://bugs.webkit.org/show_bug.cgi?id=64400
2259
2260         Reviewed by James Robinson.
2261
2262         There was no need for FrameView::syncCompositingStateForThisFrame()
2263         to call syncCompositingStateForThisLayerOnly() on the various
2264         scrollbar-related layers, because the subsequent call to 
2265         compositor()->flushPendingLayerChanges() starts to flush at
2266         m_overflowControlsHostLayer if one exists, and it's an ancestor
2267         of the scrollbar layers.
2268         
2269         Also clean up terminology in RenderLayerCompositor.
2270             m_rootPlatformLayer -> m_rootContentLayer
2271             rootPlatformLayer() -> rootGraphicsLayer()
2272         
2273         No behavior change, so no new tests.
2274         
2275         * page/FrameView.cpp:
2276         (WebCore::FrameView::syncCompositingStateForThisFrame):
2277         * rendering/RenderLayerCompositor.cpp:
2278         (WebCore::RenderLayerCompositor::enableCompositingMode):
2279         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
2280         (WebCore::RenderLayerCompositor::updateCompositingLayers):
2281         (WebCore::RenderLayerCompositor::layerTreeAsText):
2282         (WebCore::RenderLayerCompositor::parentFrameContentLayers):
2283         (WebCore::RenderLayerCompositor::rootGraphicsLayer):
2284         (WebCore::RenderLayerCompositor::didMoveOnscreen):
2285         (WebCore::RenderLayerCompositor::willMoveOffscreen):
2286         (WebCore::RenderLayerCompositor::updateRootLayerPosition):
2287         (WebCore::RenderLayerCompositor::ensureRootLayer):
2288         (WebCore::RenderLayerCompositor::destroyRootLayer):
2289         (WebCore::RenderLayerCompositor::attachRootLayer):
2290         (WebCore::RenderLayerCompositor::detachRootLayer):
2291         (WebCore::RenderLayerCompositor::updateRootLayerAttachment):
2292         * rendering/RenderLayerCompositor.h:
2293
2294 2011-07-12  Sheriff Bot  <webkit.review.bot@gmail.com>
2295
2296         Unreviewed, rolling out r90842.
2297         http://trac.webkit.org/changeset/90842
2298         https://bugs.webkit.org/show_bug.cgi?id=64401
2299
2300         Causes crash in debug on compositing/overflow/content-gains-
2301         scrollbars.html (Requested by jamesr on #webkit).
2302
2303         * WebCore.gypi:
2304         * platform/graphics/chromium/ContentLayerChromium.cpp:
2305         (WebCore::ContentLayerChromium::ContentLayerChromium):
2306         (WebCore::ContentLayerChromium::paintContentsIfDirty):
2307         (WebCore::ContentLayerChromium::cleanupResources):
2308         (WebCore::ContentLayerChromium::setLayerRenderer):
2309         (WebCore::ContentLayerChromium::tilingTransform):
2310         (WebCore::ContentLayerChromium::contentBounds):
2311         (WebCore::ContentLayerChromium::updateLayerSize):
2312         (WebCore::ContentLayerChromium::draw):
2313         (WebCore::ContentLayerChromium::drawsContent):
2314         (WebCore::ContentLayerChromium::createTilerIfNeeded):
2315         (WebCore::ContentLayerChromium::updateCompositorResources):
2316         (WebCore::ContentLayerChromium::setTilingOption):
2317         (WebCore::ContentLayerChromium::bindContentsTexture):
2318         (WebCore::ContentLayerChromium::setIsMask):
2319         (WebCore::writeIndent):
2320         (WebCore::ContentLayerChromium::dumpLayerProperties):
2321         * platform/graphics/chromium/ContentLayerChromium.h:
2322         * platform/graphics/chromium/ImageLayerChromium.cpp:
2323         (WebCore::ImageLayerChromium::ImageLayerChromium):
2324         (WebCore::ImageLayerChromium::paintContentsIfDirty):
2325         (WebCore::ImageLayerChromium::updateCompositorResources):
2326         (WebCore::ImageLayerChromium::contentBounds):
2327         * platform/graphics/chromium/ImageLayerChromium.h:
2328         (WebCore::ImageLayerChromium::drawsContent):
2329         * platform/graphics/chromium/LayerChromium.cpp:
2330         (WebCore::LayerChromium::pushPropertiesTo):
2331         (WebCore::LayerChromium::ccLayerImpl):
2332         * platform/graphics/chromium/LayerChromium.h:
2333         (WebCore::LayerChromium::draw):
2334         * platform/graphics/chromium/LayerRendererChromium.cpp:
2335         (WebCore::LayerRendererChromium::drawRootLayer):
2336         * platform/graphics/chromium/LayerTilerChromium.cpp:
2337         (WebCore::LayerTilerChromium::updateRect):
2338         (WebCore::LayerTilerChromium::draw):
2339         (WebCore::LayerTilerChromium::drawTiles):
2340         * platform/graphics/chromium/LayerTilerChromium.h:
2341         * platform/graphics/chromium/TiledLayerChromium.cpp: Removed.
2342         * platform/graphics/chromium/TiledLayerChromium.h: Removed.
2343         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
2344         (WebCore::CCLayerImpl::drawsContent):
2345         (WebCore::CCLayerImpl::draw):
2346         * platform/graphics/chromium/cc/CCLayerImpl.h:
2347         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: Removed.
2348         * platform/graphics/chromium/cc/CCTiledLayerImpl.h: Removed.
2349
2350 2011-07-12  Joseph Pecoraro  <joepeck@webkit.org>
2351
2352         ApplicationCache update should not immediately fail when reaching per-origin quota
2353         https://bugs.webkit.org/show_bug.cgi?id=64177
2354
2355         Reviewed by Alexey Proskuryakov.
2356
2357         New behavior of handling ApplicationCache per-origin quotas. Previously,
2358         if the quota was reached while downloading we would fail the download
2359         and then prompt the user for a storage increase. This required a refresh,
2360         a redownload of resources, and the total storage was not known so the
2361         process could be repeated multiple times before an acceptable quota
2362         was found or the user disallowed an increase.
2363         
2364         The new behavior is to complete the download of the entire appcache.
2365         When the cache completes downloading and it is greater than the origin
2366         quota, prompt the user to allow a quota increase with the known space
2367         needed. If the quota is increased, the cache will succeed, otherwise
2368         it will fail with the normal failure steps.
2369
2370         An alternative behavior is prompting while downloading immediately
2371         when the origin quota is reached, however at that point the entire
2372         space needed is unknown and so quota increases might not be enough
2373         and could result in multiple prompts to the user.
2374
2375         Tests: http/tests/appcache/origin-quota-continued-download-multiple-manifests.html
2376                http/tests/appcache/origin-quota-continued-download.html
2377
2378         * loader/appcache/ApplicationCacheGroup.h:
2379         * loader/appcache/ApplicationCacheGroup.cpp:
2380         (WebCore::ApplicationCacheGroup::ApplicationCacheGroup):
2381         Rename instance variable to be more clear on its intent.
2382
2383         (WebCore::ApplicationCacheGroup::didFinishLoading):
2384         Check the quota limit while downloading so we can fail early
2385         if the user already denied a quota increase.
2386
2387         (WebCore::ApplicationCacheGroup::didReachOriginQuota):
2388         Pass the space needed information to the chrome client.
2389
2390         (WebCore::ApplicationCacheGroup::cacheUpdateFailedDueToOriginQuota):
2391         Removed. Instead convert the callers to update state and console
2392         log when the per-origin quota is reached. This allows us to follow
2393         the normal failure steps if the quota is reached at the end of a
2394         download, and the alternative short path when we fail during downloading.
2395
2396         (WebCore::ApplicationCacheGroup::recalculateAvailableSpaceInQuota):
2397         Extract to a helper function.
2398
2399         (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete):
2400         Allow for a quota increase at the end of the download now that
2401         we know the space needed. Then proceed to fail or succeed
2402         as we normally would.
2403
2404         * loader/appcache/ApplicationCacheStorage.h:
2405         * loader/appcache/ApplicationCacheStorage.cpp:
2406         (WebCore::ApplicationCacheStorage::checkOriginQuota):
2407         (WebCore::ApplicationCacheStorage::storeNewestCache):
2408         Extract checking the origin quota for when an ApplicationCacheGroup
2409         will be replacing an ApplicationCacheGroup into a helper function.
2410         The helper also provides an out parameter for the space needed
2411         to properly fit the new cache group if it wouldn't fit.
2412
2413         * page/ChromeClient.h:
2414         * loader/EmptyClients.h:
2415         (WebCore::EmptyChromeClient::reachedApplicationCacheOriginQuota):
2416         Add a space needed parameter when reaching the per-origin quota.
2417
2418 2011-07-12  Chris Rogers  <crogers@google.com>
2419
2420         AudioDevice::Stop can close NULL handle.
2421         https://bugs.webkit.org/show_bug.cgi?id=64157
2422
2423         Reviewed by Kenneth Russell.
2424
2425         No new tests since audio API is not yet implemented.
2426
2427         * bindings/js/JSAudioContextCustom.cpp:
2428         (WebCore::JSAudioContextConstructor::constructJSAudioContext):
2429         * bindings/v8/custom/V8AudioContextCustom.cpp:
2430         (WebCore::V8AudioContext::constructorCallback):
2431         * webaudio/AudioContext.cpp:
2432         (WebCore::AudioContext::create):
2433         (WebCore::AudioContext::uninitialize):
2434         * webaudio/AudioContext.h:
2435
2436 2011-07-12  John Bates  <jbates@google.com>
2437
2438         Move call to syncCompositingLayers so that we do not trigger redundant draws.
2439         https://bugs.webkit.org/show_bug.cgi?id=64224
2440
2441         doComposite was triggering two composites every time a canvas was dirtied.
2442         By moving syncCompositingLayers call to layout, the client code can draw without triggering
2443         a redundant frame. Also renamed WebViewImpl::updateLayers to
2444         syncCompositingLayers, because it was confusing. CCLayerTreeHostImplProxy::updateLayers was
2445         no longer needed, because animateAndLayout calls WebViewImpl::layout.
2446
2447         Reviewed by James Robinson.
2448
2449         * platform/graphics/chromium/LayerRendererChromium.cpp:
2450         (WebCore::LayerRendererChromium::updateLayers):
2451         * platform/graphics/chromium/LayerRendererChromium.h:
2452         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
2453         (WebCore::CCLayerTreeHost::syncCompositingLayers):
2454         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
2455         * platform/graphics/chromium/cc/CCLayerTreeHostImplProxy.cpp:
2456         (WebCore::CCLayerTreeHostImplProxy::requestFrameAndCommit):
2457
2458 2011-07-12  Ryosuke Niwa  <rniwa@webkit.org>
2459
2460         Isolate HTMLTextFormControlElement into a separate file
2461         https://bugs.webkit.org/show_bug.cgi?id=64381
2462
2463         Reviewed by Dimitri Glazkov.
2464
2465         Extracted HTMLTextFormControlElement.h and HTMLTextFormControlElement.cpp out of
2466         HTMLFormControlElement.h and HTMLFormControlElement.cpp.
2467
2468         Also moved defaultEventHandler from HTMLFormControlElementWithState to HTMLTextFormControlElement
2469         because it was specific to HTMLTextFormControlElement, and replaced all references to
2470         HTMLFormControlElementWithState in HTMLInputElement and HTMLTextAreaElement by ones to
2471         HTMLTextFormControlElement.
2472
2473         * CMakeLists.txt:
2474         * GNUmakefile.list.am:
2475         * WebCore.gypi:
2476         * WebCore.pro:
2477         * WebCore.vcproj/WebCore.vcproj:
2478         * WebCore.xcodeproj/project.pbxproj:
2479         * editing/TextIterator.cpp:
2480         * editing/htmlediting.cpp:
2481         * html/HTMLElementsAllInOne.cpp:
2482         * html/HTMLFormControlElement.cpp:
2483         (WebCore::HTMLFormControlElement::isFocusable):
2484         * html/HTMLFormControlElement.h:
2485         * html/HTMLInputElement.cpp:
2486         (WebCore::HTMLInputElement::isKeyboardFocusable):
2487         (WebCore::HTMLInputElement::isMouseFocusable):
2488         (WebCore::HTMLInputElement::updateFocusAppearance):
2489         (WebCore::HTMLInputElement::canStartSelection):
2490         (WebCore::HTMLInputElement::parseMappedAttribute):
2491         (WebCore::HTMLInputElement::finishParsingChildren):
2492         (WebCore::HTMLInputElement::rendererIsNeeded):
2493         (WebCore::HTMLInputElement::attach):
2494         (WebCore::HTMLInputElement::detach):
2495         (WebCore::HTMLInputElement::copyNonAttributeProperties):
2496         (WebCore::HTMLInputElement::defaultEventHandler):
2497         (WebCore::HTMLInputElement::willMoveToNewOwnerDocument):
2498         (WebCore::HTMLInputElement::didMoveToNewOwnerDocument):
2499         (WebCore::HTMLInputElement::addSubresourceAttributeURLs):
2500         (WebCore::HTMLInputElement::recalcWillValidate):
2501         * html/HTMLInputElement.h:
2502         * html/HTMLTextAreaElement.cpp:
2503         (WebCore::HTMLTextAreaElement::defaultEventHandler):
2504         * html/HTMLTextAreaElement.h:
2505         * html/HTMLTextFormControlElement.cpp: Copied from Source/WebCore/html/HTMLFormControlElement.cpp.
2506         (WebCore::HTMLTextFormControlElement::defaultEventHandler):
2507         * html/HTMLTextFormControlElement.h: Copied from Source/WebCore/html/HTMLFormControlElement.h.
2508
2509 2011-07-12  Sheriff Bot  <webkit.review.bot@gmail.com>
2510
2511         Unreviewed, rolling out r90831.
2512         http://trac.webkit.org/changeset/90831
2513         https://bugs.webkit.org/show_bug.cgi?id=64389
2514
2515         Likely caused fast/canvas/DrawImageSinglePixelStretch.html to
2516         start timing out on the chromium GPU bots (Requested by ojan
2517         on #webkit).
2518
2519         * platform/graphics/skia/ImageBufferSkia.cpp:
2520         (WebCore::getImageData):
2521         (WebCore::putImageData):
2522
2523 2011-07-12  James Robinson  <jamesr@chromium.org>
2524
2525         Reviewed by Kenneth Russell.
2526
2527         [chromium] Move draw implementation for ContentLayerChromium/ImageLayerChromium to the appropriate CCLayerImpl subclass
2528         https://bugs.webkit.org/show_bug.cgi?id=58833
2529
2530         Adds a TiledLayerChromium class to handle the tiling logic shared by ContentLayerChromium and ImageLayerChromium
2531         so that they can be siblings in the class hierarchy instead of children. Also adds a CCTiledLayerImpl to handle
2532         the drawing responsibilities for tiled layers.
2533
2534         TiledLayerChromium maintains a tiler, tiling options, and calculates the tiling transform. Subclasses are
2535         responsible for providing an appropriate texture updater implementation. CCTiledLayerImpl takes the tiler,
2536         tiling transform and layer properties and draws the layer.  Longer term it'd be better of the CCTiledLayerImpl
2537         owned the tiler and the TiledLayerChromium only owned an updater, but getting there will require changing the
2538         way tile eviction works.
2539
2540         * WebCore.gypi:
2541         * platform/graphics/chromium/ContentLayerChromium.cpp:
2542         (WebCore::ContentLayerChromium::ContentLayerChromium):
2543         (WebCore::ContentLayerChromium::paintContentsIfDirty):
2544         (WebCore::ContentLayerChromium::drawsContent):
2545         * platform/graphics/chromium/ContentLayerChromium.h:
2546         (WebCore::ContentLayerChromium::textureUpdater):
2547         * platform/graphics/chromium/ImageLayerChromium.cpp:
2548         (WebCore::ImageLayerChromium::ImageLayerChromium):
2549         (WebCore::ImageLayerChromium::cleanupResources):
2550         (WebCore::ImageLayerChromium::paintContentsIfDirty):
2551         (WebCore::ImageLayerChromium::textureUpdater):
2552         (WebCore::ImageLayerChromium::contentBounds):
2553         (WebCore::ImageLayerChromium::drawsContent):
2554         (WebCore::ImageLayerChromium::createTextureUpdaterIfNeeded):
2555         * platform/graphics/chromium/ImageLayerChromium.h:
2556         * platform/graphics/chromium/LayerChromium.cpp:
2557         (WebCore::LayerChromium::pushPropertiesTo):
2558         (WebCore::LayerChromium::ccLayerImpl):
2559         * platform/graphics/chromium/LayerChromium.h:
2560         (WebCore::LayerChromium::contentBounds):
2561         * platform/graphics/chromium/LayerRendererChromium.cpp:
2562         (WebCore::LayerRendererChromium::drawRootLayer):
2563         (WebCore::visibleLayerRect):
2564         (WebCore::paintLayerContentsIfDirty):
2565         (WebCore::LayerRendererChromium::paintLayerContents):
2566         (WebCore::LayerRendererChromium::drawLayer):
2567         * platform/graphics/chromium/LayerTilerChromium.cpp:
2568         (WebCore::LayerTilerChromium::updateRect):
2569         (WebCore::LayerTilerChromium::draw):
2570         (WebCore::LayerTilerChromium::drawTiles):
2571         * platform/graphics/chromium/LayerTilerChromium.h:
2572         * platform/graphics/chromium/TiledLayerChromium.cpp: Added.
2573         (WebCore::TiledLayerChromium::TiledLayerChromium):
2574         (WebCore::TiledLayerChromium::~TiledLayerChromium):
2575         (WebCore::TiledLayerChromium::createCCLayerImpl):
2576         (WebCore::TiledLayerChromium::cleanupResources):
2577         (WebCore::TiledLayerChromium::setLayerRenderer):
2578         (WebCore::TiledLayerChromium::updateTileSizeAndTilingOption):
2579         (WebCore::TiledLayerChromium::drawsContent):
2580         (WebCore::TiledLayerChromium::createTilerIfNeeded):
2581         (WebCore::TiledLayerChromium::updateCompositorResources):
2582         (WebCore::TiledLayerChromium::setTilingOption):
2583         (WebCore::TiledLayerChromium::setIsMask):
2584         (WebCore::TiledLayerChromium::tilingTransform):
2585         (WebCore::TiledLayerChromium::pushPropertiesTo):
2586         (WebCore::writeIndent):
2587         (WebCore::TiledLayerChromium::dumpLayerProperties):
2588         * platform/graphics/chromium/TiledLayerChromium.h: Copied from Source/WebCore/platform/graphics/chromium/ContentLayerChromium.h.
2589         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
2590         (WebCore::CCLayerImpl::draw):
2591         * platform/graphics/chromium/cc/CCLayerImpl.h:
2592         (WebCore::CCLayerImpl::setDrawsContent):
2593         (WebCore::CCLayerImpl::drawsContent):
2594         (WebCore::CCLayerImpl::contentBounds):
2595         (WebCore::CCLayerImpl::setContentBounds):
2596         (WebCore::CCLayerImpl::doubleSided):
2597         (WebCore::CCLayerImpl::setDoubleSided):
2598         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: Added.
2599         (WebCore::CCTiledLayerImpl::CCTiledLayerImpl):
2600         (WebCore::CCTiledLayerImpl::~CCTiledLayerImpl):
2601         (WebCore::CCTiledLayerImpl::draw):
2602         (WebCore::CCTiledLayerImpl::bindContentsTexture):
2603         (WebCore::CCTiledLayerImpl::dumpLayerProperties):
2604         * platform/graphics/chromium/cc/CCTiledLayerImpl.h: Added.
2605         (WebCore::CCTiledLayerImpl::create):
2606         (WebCore::CCTiledLayerImpl::setTilingTransform):
2607         (WebCore::CCTiledLayerImpl::setTiler):
2608
2609 2011-07-12  Arno Renevier  <arno@renevier.net>
2610
2611         [GTK] DOM bindings do not have gir annotations
2612         https://bugs.webkit.org/show_bug.cgi?id=45395
2613
2614         Reviewed by Xan Lopez.
2615
2616         * bindings/scripts/CodeGeneratorGObject.pm: generate introspection annotations.
2617         * bindings/scripts/test/GObject/WebKitDOMTestCallback.h: update for new output.
2618         * bindings/scripts/test/GObject/WebKitDOMTestObj.h: ditto.
2619         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h: ditto.
2620
2621 2011-07-12  Chris Rogers  <crogers@google.com>
2622
2623         webkitAudioContext does not do proper sanity checking on its arguments.
2624         https://bugs.webkit.org/show_bug.cgi?id=64076
2625
2626         Reviewed by Kenneth Russell.
2627
2628         No new tests since audio API is not yet implemented.
2629
2630         * bindings/js/JSAudioContextCustom.cpp:
2631         (WebCore::JSAudioContextConstructor::constructJSAudioContext):
2632         (WebCore::JSAudioContext::createBuffer):
2633         * bindings/v8/custom/V8AudioContextCustom.cpp:
2634         (WebCore::V8AudioContext::constructorCallback):
2635         (WebCore::V8AudioContext::createBufferCallback):
2636         * platform/audio/HRTFDatabaseLoader.h:
2637         (WebCore::HRTFDatabaseLoader::databaseSampleRate):
2638         * webaudio/AudioContext.cpp:
2639         (WebCore::AudioContext::create):
2640         (WebCore::AudioContext::createOfflineContext):
2641         (WebCore::AudioContext::createBuffer):
2642         * webaudio/AudioContext.h:
2643
2644 2011-07-12  Pratik Solanki  <psolanki@apple.com>
2645
2646         Implement didReceiveDataArray callback for CFNetwork based loader
2647         https://bugs.webkit.org/show_bug.cgi?id=64130
2648
2649         Reviewed by David Kilzer.
2650
2651         Factor out the didReceiveDataArray code from ResourceHandleMac.mm into
2652         a new method ResourceHandle::handleDataArray(). Implement the callback
2653         in the CFNetwork loader code and call handleDataArray() to process
2654         incoming data.
2655
2656         No new tests because the flag is not enabled for any bots.
2657
2658         * platform/network/ResourceHandle.h:
2659         * platform/network/cf/ResourceHandleCFNet.cpp:
2660         (WebCore::didReceiveDataArray):
2661         (WebCore::ResourceHandle::createCFURLConnection):
2662         (WebCore::ResourceHandle::handleDataArray):
2663         * platform/network/mac/ResourceHandleMac.mm:
2664         (-[WebCoreResourceHandleAsDelegate connection:didReceiveDataArray:]):
2665
2666 2011-07-12  Emil A Eklund  <eae@chromium.org>
2667
2668         Switch preferred width/height and columns to to new layout types
2669         https://bugs.webkit.org/show_bug.cgi?id=64329
2670
2671         Reviewed by Eric Seidel.
2672
2673         No new tests, no new functionality.
2674
2675         * rendering/LayoutTypes.h:
2676         (WebCore::ceiledLayoutUnit):
2677         Add ceiledLayoutUnit to go with the floored version.
2678         
2679         * rendering/RenderBlock.cpp:
2680         (WebCore::RenderBlock::adjustRectForColumns):
2681         (WebCore::RenderBlock::flipForWritingModeIncludingColumns):
2682         (WebCore::RenderBlock::adjustStartEdgeForWritingModeIncludingColumns):
2683         Rename rect version of flipForWritingModeIncludingColumns to
2684         adjustStartEdgeForWritingModeIncludingColumns as it adjust the start edge
2685         and does not flip the rect.
2686        
2687         (WebCore::RenderBlock::adjustForColumns):
2688         (WebCore::updatePreferredWidth):
2689         * rendering/RenderBlock.h:
2690         * rendering/RenderBox.cpp:
2691         (WebCore::RenderBox::minPreferredLogicalWidth):
2692         (WebCore::RenderBox::maxPreferredLogicalWidth):
2693         (WebCore::RenderBox::offsetFromContainer):
2694         (WebCore::RenderBox::computePercentageLogicalHeight):
2695         (WebCore::RenderBox::flipForWritingMode):
2696         (WebCore::RenderBox::flipForWritingModeIncludingColumns):
2697         * rendering/RenderBox.h:
2698         * rendering/RenderListBox.cpp:
2699         (WebCore::RenderListBox::itemBoundingBoxRect):
2700         * rendering/RenderListBox.h:
2701         * rendering/RenderObject.h:
2702         (WebCore::RenderObject::minPreferredLogicalWidth):
2703         (WebCore::RenderObject::maxPreferredLogicalWidth):
2704         (WebCore::RenderObject::adjustForColumns):
2705         * rendering/RenderReplaced.cpp:
2706         (WebCore::RenderReplaced::computeReplacedLogicalWidth):
2707         (WebCore::RenderReplaced::computeReplacedLogicalHeight):
2708         * rendering/TableLayout.h:
2709
2710 2011-07-12  Levi Weintraub  <leviw@chromium.org>
2711
2712         Change roundedIntRect to roundedRect
2713         https://bugs.webkit.org/show_bug.cgi?id=64326
2714
2715         Reviewed by Eric Seidel.
2716
2717         Renaming RoundedIntRect to RoundedRect and moving the underlying type to Layout units from
2718         integer-based versions.
2719
2720         No new tests, no new functionality
2721
2722         * WebCore.gypi:
2723         * WebCore.pro:
2724         * WebCore.vcproj/WebCore.vcproj:
2725         * WebCore.xcodeproj/project.pbxproj:
2726         * platform/graphics/GraphicsContext.cpp:
2727         (WebCore::GraphicsContext::addRoundedRectClip):
2728         (WebCore::GraphicsContext::clipOutRoundedRect):
2729         (WebCore::GraphicsContext::fillRoundedRect):
2730         (WebCore::GraphicsContext::fillRectWithRoundedHole):
2731         * platform/graphics/GraphicsContext.h:
2732         * platform/graphics/Path.cpp:
2733         (WebCore::Path::addRoundedRect):
2734         * platform/graphics/Path.h:
2735         * platform/graphics/RoundedIntRect.cpp: Removed.
2736         * platform/graphics/RoundedIntRect.h: Removed.
2737         * platform/graphics/RoundedRect.cpp: Copied from Source/WebCore/platform/graphics/RoundedIntRect.cpp.
2738         (WebCore::RoundedRect::Radii::isZero):
2739         (WebCore::RoundedRect::Radii::scale):
2740         (WebCore::RoundedRect::Radii::expand):
2741         (WebCore::RoundedRect::inflateWithRadii):
2742         (WebCore::RoundedRect::Radii::includeLogicalEdges):
2743         (WebCore::RoundedRect::Radii::excludeLogicalEdges):
2744         (WebCore::RoundedRect::RoundedRect):
2745         (WebCore::RoundedRect::includeLogicalEdges):
2746         (WebCore::RoundedRect::excludeLogicalEdges):
2747         (WebCore::RoundedRect::isRenderable):
2748         * platform/graphics/RoundedRect.h: Copied from Source/WebCore/platform/graphics/RoundedIntRect.h.
2749         (WebCore::RoundedRect::Radii::Radii):
2750         (WebCore::RoundedRect::Radii::setTopLeft):
2751         (WebCore::RoundedRect::Radii::setTopRight):
2752         (WebCore::RoundedRect::Radii::setBottomLeft):
2753         (WebCore::RoundedRect::Radii::setBottomRight):
2754         (WebCore::RoundedRect::Radii::topLeft):
2755         (WebCore::RoundedRect::Radii::topRight):
2756         (WebCore::RoundedRect::Radii::bottomLeft):
2757         (WebCore::RoundedRect::Radii::bottomRight):
2758         (WebCore::RoundedRect::Radii::expand):
2759         (WebCore::RoundedRect::Radii::shrink):
2760         (WebCore::RoundedRect::rect):
2761         (WebCore::RoundedRect::setRect):
2762         (WebCore::RoundedRect::move):
2763         (WebCore::RoundedRect::inflate):
2764         (WebCore::RoundedRect::expandRadii):
2765         (WebCore::RoundedRect::shrinkRadii):
2766         (WebCore::operator==):
2767         * platform/graphics/ShadowBlur.cpp:
2768         (WebCore::ScratchBuffer::setLastShadowValues):
2769         (WebCore::ScratchBuffer::setLastInsetShadowValues):
2770         (WebCore::ScratchBuffer::matchesLastShadow):
2771         (WebCore::ScratchBuffer::matchesLastInsetShadow):
2772         (WebCore::computeSliceSizesFromRadii):
2773         (WebCore::ShadowBlur::templateSize):
2774         (WebCore::ShadowBlur::drawRectShadow):
2775         (WebCore::ShadowBlur::drawInsetShadow):
2776         (WebCore::ShadowBlur::drawRectShadowWithoutTiling):
2777         (WebCore::ShadowBlur::drawInsetShadowWithoutTiling):
2778         (WebCore::ShadowBlur::drawInsetShadowWithTiling):
2779         (WebCore::ShadowBlur::drawRectShadowWithTiling):
2780         (WebCore::ShadowBlur::drawLayerPieces):
2781         * platform/graphics/ShadowBlur.h:
2782         * platform/graphics/cg/GraphicsContextCG.cpp:
2783         (WebCore::GraphicsContext::fillRect):
2784         (WebCore::GraphicsContext::fillRoundedRect):
2785         (WebCore::GraphicsContext::fillRectWithRoundedHole):
2786         * rendering/RenderBox.cpp:
2787         (WebCore::RenderBox::paintBoxDecorations):
2788         * rendering/RenderBoxModelObject.cpp:
2789         (WebCore::RenderBoxModelObject::getBackgroundRoundedRect):
2790         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
2791         (WebCore::RenderBoxModelObject::paintOneBorderSide):
2792         (WebCore::RenderBoxModelObject::paintBorderSides):
2793         (WebCore::RenderBoxModelObject::paintTranslucentBorderSides):
2794         (WebCore::RenderBoxModelObject::paintBorder):
2795         (WebCore::RenderBoxModelObject::drawBoxSideFromPath):
2796         (WebCore::RenderBoxModelObject::clipBorderSidePolygon):
2797         (WebCore::RenderBoxModelObject::paintBoxShadow):
2798         * rendering/RenderBoxModelObject.h:
2799         * rendering/RenderThemeMac.mm:
2800         (WebCore::RenderThemeMac::paintMenuListButtonGradients):
2801         (WebCore::RenderThemeMac::paintSliderTrack):
2802         * rendering/style/RenderStyle.cpp:
2803         (WebCore::calcRadiiFor):
2804         (WebCore::calcConstraintScaleFor):
2805         (WebCore::RenderStyle::getRoundedBorderFor):
2806         (WebCore::RenderStyle::getRoundedInnerBorderFor):
2807         * rendering/style/RenderStyle.h:
2808
2809 2011-07-12  Mike Reed  <reed@google.com>
2810
2811         [skia] optimize getImageData to avoid a copy when not needed. lockPixels() now does the right thing.
2812         https://bugs.webkit.org/show_bug.cgi?id=64302
2813
2814         Reviewed by Stephen White.
2815
2816         No new tests. Just an optimization for getImageData(), existing <canvas> tests apply
2817
2818         * platform/graphics/skia/ImageBufferSkia.cpp:
2819         (WebCore::getImageData):
2820         (WebCore::putImageData):
2821
2822 2011-07-12  Pavel Feldman  <pfeldman@google.com>
2823
2824         Web Inspector: introduce UserMetrics for collecting stats in Chromium port.
2825         https://bugs.webkit.org/show_bug.cgi?id=64350
2826
2827         Reviewed by Yury Semikhatsky.
2828
2829         Test: inspector/user-metrics.html
2830
2831         * WebCore.gypi:
2832         * WebCore.vcproj/WebCore.vcproj:
2833         * bindings/js/JSInspectorFrontendHostCustom.cpp:
2834         (WebCore::JSInspectorFrontendHost::recordActionTaken):
2835         (WebCore::JSInspectorFrontendHost::recordPanelShown):
2836         (WebCore::JSInspectorFrontendHost::recordSettingChanged):
2837         * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp:
2838         (WebCore::histogramEnumeration):
2839         (WebCore::V8InspectorFrontendHost::recordActionTakenCallback):
2840         (WebCore::V8InspectorFrontendHost::recordPanelShownCallback):
2841         (WebCore::V8InspectorFrontendHost::recordSettingChangedCallback):
2842         * inspector/InspectorFrontendHost.idl:
2843         * inspector/front-end/AuditsPanel.js:
2844         (WebInspector.AuditsPanel.prototype.initiateAudit):
2845         * inspector/front-end/ConsoleView.js:
2846         * inspector/front-end/DebuggerModel.js:
2847         (WebInspector.DebuggerModel.prototype.setBreakpoint):
2848         (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId):
2849         * inspector/front-end/InspectorFrontendHostStub.js:
2850         (.WebInspector.InspectorFrontendHostStub.prototype.loadSessionSetting):
2851         (.WebInspector.InspectorFrontendHostStub.prototype.recordActionTaken):
2852         (.WebInspector.InspectorFrontendHostStub.prototype.recordPanelShown):
2853         (.WebInspector.InspectorFrontendHostStub.prototype.recordSettingChanged):
2854         * inspector/front-end/ProfilesPanel.js:
2855         (WebInspector.ProfilesPanel.prototype._setRecordingProfile):
2856         (WebInspector.ProfilesPanel.prototype.takeHeapSnapshot):
2857         * inspector/front-end/TimelinePanel.js:
2858         (WebInspector.TimelinePanel.prototype._toggleTimelineButtonClicked):
2859         * inspector/front-end/UserMetrics.js: Added.
2860         (WebInspector.UserMetrics.settingChanged):
2861         (WebInspector.UserMetrics):
2862         (WebInspector.UserMetrics.prototype.panelShown):
2863         (WebInspector.UserMetrics._Recorder):
2864         (WebInspector.UserMetrics._Recorder.prototype.record):
2865         * inspector/front-end/WebKit.qrc:
2866         * inspector/front-end/inspector.html:
2867         * inspector/front-end/inspector.js:
2868         (WebInspector._toggleAttach):
2869
2870 2011-07-12  Pratik Solanki  <psolanki@apple.com>
2871
2872         Reviewed by David Kilzer.
2873
2874         Add NSURLResponse wrapper in ResourceResponse when USE(CFNETWORK) is enabled
2875         https://bugs.webkit.org/show_bug.cgi?id=63286
2876
2877         When USE(CFNETWORK) is enabled on Mac, keep an NSURLResponse object along with the
2878         CFURLResponseRef so that WebKit can continue using the NSURLResponse.
2879
2880         No new tests because no change in functionality and option is not enabled on Mac.
2881
2882         * platform/network/cf/ResourceResponse.h:
2883         (WebCore::ResourceResponse::ResourceResponse):
2884         * platform/network/mac/ResourceResponseMac.mm:
2885         (WebCore::ResourceResponse::initNSURLResponse):
2886         (WebCore::ResourceResponse::nsURLResponse):
2887         (WebCore::ResourceResponse::ResourceResponse):
2888
2889 2011-07-12  Pavel Podivilov  <podivilov@chromium.org>
2890
2891         Web Inspector: Cancelling an empty edit fails.
2892         https://bugs.webkit.org/show_bug.cgi?id=64351
2893
2894         Reviewed by Pavel Feldman.
2895
2896         * inspector/front-end/ResourceView.js:
2897         (WebInspector.EditableResourceSourceFrame.prototype.cancelEditing):
2898
2899 2011-07-12  Pavel Podivilov  <podivilov@chromium.org>
2900
2901         Web Inspector: make TextViewerDelegate methods implementations public in SourceFrame.
2902         https://bugs.webkit.org/show_bug.cgi?id=64353
2903
2904         Reviewed by Pavel Feldman.
2905
2906         * inspector/front-end/SourceFrame.js:
2907         (WebInspector.SourceFrame.prototype.beforeTextChanged):
2908         (WebInspector.SourceFrame.prototype.afterTextChanged):
2909         (WebInspector.SourceFrame.prototype.populateTextAreaContextMenu):
2910         (WebInspector.SourceFrame.prototype.suggestedFileName):
2911         (WebInspector.SourceFrame.prototype.doubleClick):
2912         (WebInspector.SourceFrame.prototype.cancelEditing):
2913         (WebInspector.TextViewerDelegateForSourceFrame.prototype.doubleClick):
2914         (WebInspector.TextViewerDelegateForSourceFrame.prototype.beforeTextChanged):
2915         (WebInspector.TextViewerDelegateForSourceFrame.prototype.afterTextChanged):
2916         (WebInspector.TextViewerDelegateForSourceFrame.prototype.commitEditing):
2917         (WebInspector.TextViewerDelegateForSourceFrame.prototype.cancelEditing):
2918         (WebInspector.TextViewerDelegateForSourceFrame.prototype.populateLineGutterContextMenu):
2919         (WebInspector.TextViewerDelegateForSourceFrame.prototype.populateTextAreaContextMenu):
2920         (WebInspector.TextViewerDelegateForSourceFrame.prototype.suggestedFileName):
2921
2922 2011-07-12  Andrey Kosyakov  <caseq@chromium.org>
2923
2924         Web Inspector: remove more dead code from the Network panel
2925         https://bugs.webkit.org/show_bug.cgi?id=64291
2926
2927         Reviewed by Pavel Feldman.
2928
2929         * inspector/front-end/NetworkPanel.js:
2930         (WebInspector.NetworkPanel.prototype._toggleGridMode):
2931         (WebInspector.NetworkPanel.prototype._toggleViewingResourceMode):
2932         * inspector/front-end/networkPanel.css:
2933
2934 2011-07-12  Adam Roben  <aroben@apple.com>
2935
2936         Unreviewed, rolling out r90811.
2937         http://trac.webkit.org/changeset/90811
2938         https://bugs.webkit.org/show_bug.cgi?id=61025
2939
2940         Several svg tests failing assertions beneath
2941         SVGSMILElement::findInstanceTime
2942
2943         * svg/animation/SVGSMILElement.cpp:
2944         (WebCore::SVGSMILElement::findInstanceTime):
2945
2946 2011-07-12  Oliver Varga  <Varga.Oliver@stud.u-szeged.hu>
2947
2948         Reviewed by Nikolas Zimmermann.
2949
2950         Speed up SVGSMILElement::findInstanceTime.
2951         https://bugs.webkit.org/show_bug.cgi?id=61025
2952
2953         Replace the linear search to binary search on ordered list because
2954         the previous searches from the beginning was not efficient.
2955         Out of index error fixed by Renata Hodovan.
2956
2957         No new tests this is only a performance tweak.
2958
2959         * svg/animation/SVGSMILElement.cpp:
2960         (WebCore::extractTimeFromVector):
2961         (WebCore::SVGSMILElement::findInstanceTime):
2962
2963 2011-07-11  Zeng Huiqing  <huiqing.zeng@intel.com>
2964
2965         Optimize HTMLInputElement::updateCheckedRadioButtons
2966         https://bugs.webkit.org/show_bug.cgi?id=62840
2967
2968         Reviewed by Kent Tamura.
2969
2970         No new tests.
2971
2972         * dom/Document.h:
2973         (WebCore::Document::getFormElements):
2974         * html/HTMLInputElement.cpp:
2975         (WebCore::HTMLInputElement::updateCheckedRadioButtons):
2976         (WebCore::HTMLInputElement::setChecked):
2977
2978 2011-07-11  Pratik Solanki  <psolanki@apple.com>
2979
2980         Reviewed by David Kilzer.
2981
2982         Add NSURLRequest wrapper in ResourceRequest when USE(CFNETWORK) is enabled
2983         https://bugs.webkit.org/show_bug.cgi?id=63276
2984
2985         When USE(CFNETWORK) is enabled on Mac, keep an NSURLRequest object along with the
2986         CFURLRequestRef so that WebKit can continue using the NSURLRequest.
2987
2988         No new tests because no change in functionality and option is not enabled on Mac.
2989
2990         * platform/network/cf/ResourceRequest.h:
2991         (WebCore::ResourceRequest::updateNSURLRequest):
2992         (WebCore::ResourceRequest::ResourceRequest):
2993         * platform/network/cf/ResourceRequestCFNet.cpp:
2994         (WebCore::findCFURLRequestSetContentDispositionEncodingFallbackArrayFunction):
2995         (WebCore::findCFURLRequestCopyContentDispositionEncodingFallbackArrayFunction):
2996         (WebCore::ResourceRequest::doUpdatePlatformRequest):
2997         (WebCore::ResourceRequest::applyWebArchiveHackForMail):
2998         * platform/network/mac/ResourceRequestMac.mm:
2999         (WebCore::ResourceRequest::nsURLRequest):
3000         (WebCore::ResourceRequest::ResourceRequest):
3001         (WebCore::ResourceRequest::updateNSURLRequest):
3002
3003 2011-07-11  Ryosuke Niwa  <rniwa@webkit.org>
3004
3005         positionForPoint is broken when a block is positioned relatively inside the parent
3006         https://bugs.webkit.org/show_bug.cgi?id=64298
3007
3008         Reviewed by Simon Fraser.
3009
3010         The bug was caused by positionForPointRespectingEditingBoundaries's not taking relativePositionOffset
3011         into account when computing the point in child coordinates. Fixed the bug by adding the offset to
3012         childLocation as needed.
3013
3014         Test: fast/block/positioning/hittest-on-relative-positioned-children.html
3015
3016         * rendering/RenderBlock.cpp:
3017         (WebCore::positionForPointRespectingEditingBoundaries): Fixed the bug; also replaced all instances of
3018         IntPoint by LayoutPoint.
3019
3020 2011-07-11  Dan Bernstein  <mitz@apple.com>
3021
3022         Excessive expansion of justified text when rounding hacks are enabled
3023         https://bugs.webkit.org/show_bug.cgi?id=64331
3024
3025         Reviewed by Anders Carlsson.
3026
3027         Test: platform/mac/fast/text/rounding-hacks-expansion.html
3028
3029         When rounding hacks are enabled, the expansion at each expansion opportunity should be by an
3030         integer. Restored more of the logic that was removed in r78846 in order to ensure this.
3031
3032         * platform/graphics/WidthIterator.cpp:
3033         (WebCore::WidthIterator::advance):
3034         * platform/graphics/mac/ComplexTextController.cpp:
3035         (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
3036
3037 2011-07-11  Jer Noble  <jer.noble@apple.com>
3038
3039         HTML5 video controller in fullscreen is partly off-screen (at least on youtube) using ClickToFlash
3040         https://bugs.webkit.org/show_bug.cgi?id=64327
3041
3042         Reviewed by Darin Adler.
3043
3044         No new tests; no change in functionality, so covered by existing tests.
3045
3046         Make the rules from fullscreenQuickTime.css !important so they are not overridden
3047         by page authors.
3048
3049         * css/fullscreenQuickTime.css:
3050         (video:-webkit-full-screen::-webkit-media-controls-panel):
3051
3052 2011-07-11  Levi Weintraub  <leviw@chromium.org>
3053
3054         Switch lineTop and lineBottom to new layout types
3055         https://bugs.webkit.org/show_bug.cgi?id=64317
3056
3057         Reviewed by Eric Seidel.
3058
3059         Changing lineTop and lineBottom to LayoutUnits and preparing all uses
3060         of them for the upcoming conversion.
3061
3062         No new tests, no new functionality.
3063
3064         * rendering/EllipsisBox.cpp:
3065         (WebCore::EllipsisBox::nodeAtPoint):
3066         * rendering/EllipsisBox.h:
3067         * rendering/GapRects.h:
3068         (WebCore::GapRects::left):
3069         (WebCore::GapRects::center):
3070         (WebCore::GapRects::right):
3071         (WebCore::GapRects::uniteLeft):
3072         (WebCore::GapRects::uniteCenter):
3073         (WebCore::GapRects::uniteRight):
3074         (WebCore::GapRects::operator LayoutRect):
3075         * rendering/InlineBox.cpp:
3076         (WebCore::InlineBox::nodeAtPoint):
3077         * rendering/InlineBox.h:
3078         * rendering/InlineFlowBox.cpp:
3079         (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
3080         (WebCore::InlineFlowBox::flipLinesInBlockDirection):
3081         (WebCore::InlineFlowBox::computeOverflow):
3082         (WebCore::InlineFlowBox::setLayoutOverflow):
3083         (WebCore::InlineFlowBox::setVisualOverflow):
3084         (WebCore::InlineFlowBox::setOverflowFromLogicalRects):
3085         (WebCore::InlineFlowBox::nodeAtPoint):
3086         * rendering/InlineFlowBox.h:
3087         (WebCore::InlineFlowBox::layoutOverflowRect):
3088         (WebCore::InlineFlowBox::visualOverflowRect):
3089         * rendering/InlineTextBox.cpp:
3090         (WebCore::InlineTextBox::nodeAtPoint):
3091         * rendering/RenderLineBoxList.cpp:
3092         (WebCore::RenderLineBoxList::anyLineIntersectsRect):
3093         * rendering/RenderLineBoxList.h:
3094         * rendering/RenderListItem.cpp:
3095         (WebCore::RenderListItem::positionListMarker):
3096         * rendering/RenderTextControl.h:
3097         * rendering/RenderTextControlMultiLine.cpp:
3098         (WebCore::RenderTextControlMultiLine::adjustControlHeightBasedOnLineHeight):
3099         * rendering/RenderTextControlSingleLine.cpp:
3100         (WebCore::RenderTextControlSingleLine::adjustControlHeightBasedOnLineHeight):
3101         * rendering/RenderTextControlSingleLine.h:
3102         * rendering/RootInlineBox.cpp:
3103         (WebCore::RootInlineBox::nodeAtPoint):
3104         * rendering/RootInlineBox.h:
3105         (WebCore::RootInlineBox::lineTop):
3106         (WebCore::RootInlineBox::lineBottom):
3107         (WebCore::RootInlineBox::setLineTopBottomPositions):
3108         (WebCore::RootInlineBox::logicalTopVisualOverflow):
3109         (WebCore::RootInlineBox::logicalBottomVisualOverflow):
3110         (WebCore::RootInlineBox::logicalTopLayoutOverflow):
3111         (WebCore::RootInlineBox::logicalBottomLayoutOverflow):
3112         * rendering/svg/SVGInlineFlowBox.h:
3113         * rendering/svg/SVGInlineTextBox.cpp:
3114         (WebCore::SVGInlineTextBox::nodeAtPoint):
3115         * rendering/svg/SVGInlineTextBox.h:
3116         * rendering/svg/SVGRootInlineBox.h:
3117
3118 2011-07-11  Martin Robinson  <mrobinson@igalia.com>
3119
3120         Reviewed by Daniel Bates.
3121
3122         [GTK] Transition to Mozilla named cursors have incorrect hotspot and rendering
3123         https://bugs.webkit.org/show_bug.cgi?id=62752
3124
3125         Instead of offsetting the cursor blit by the hotspot, just pass the hotspot
3126         arguments to the GdkCursor constructor.
3127
3128         No new tests. This is covered by manual-tests/cursor.html.
3129
3130         * platform/gtk/CursorGtk.cpp:
3131         (WebCore::createNamedCursor):
3132
3133 2011-07-11  Yi Shen  <yi.4.shen@nokia.com>
3134
3135         [Qt] Unreviewed rollout 90779 which may fail the layout-test.
3136
3137         * platform/network/qt/QNetworkReplyHandler.cpp:
3138         (WebCore::QNetworkReplyHandlerCallQueue::setDeferSignals):
3139         * platform/network/qt/QNetworkReplyHandler.h:
3140
3141 2011-07-11  Bradley Nelson  <bradnelson@chromium.org>
3142
3143         Reviewed by Darin Fisher.
3144
3145         Split webcore_dom off webcore_remaining to reduce its size for
3146         whole program optimization builds.
3147
3148         https://bugs.webkit.org/show_bug.cgi?id=64299
3149
3150         * WebCore.gyp/WebCore.gyp:
3151
3152 2011-07-11  Yi Shen  <yi.4.shen@nokia.com>
3153
3154         [Qt] ASSERTION FAILED in ResourceHandle::setDefersLoading causes crash
3155         https://bugs.webkit.org/show_bug.cgi?id=62808
3156
3157         Reviewed by Benjamin Poulain.
3158
3159         The assertion in ResourceHandle::setDefersLoading assumes asynchronous
3160         content delivery -- To resume a page, first, its main resource loader
3161         calls setDefersLoading to resume loading the main content; then all the
3162         sub-resource loaders calls setDefersLoading to resume sub-contents.
3163         However, since QNetworkReplyHandler delivers content synchronously,
3164         some new sub-resource loaders get created as soon as the main resource
3165         loader resumed, and all these new sub-resource loaders set their
3166         defersLoading flag to false. Then, the assertion fails for these new
3167         sub-resource loaders when calling setDefersLoading on them. As a fix,
3168         this path makes QNetworkReplyHandler deliver content asynchronously.
3169
3170         Test: loader/load-defer-resume-crash.html
3171
3172         * platform/network/qt/QNetworkReplyHandler.cpp:
3173         (WebCore::QNetworkReplyHandlerCallQueue::setDeferSignals):
3174         * platform/network/qt/QNetworkReplyHandler.h:
3175
3176 2011-07-08  Ryosuke Niwa  <rniwa@webkit.org>
3177
3178         Move innerTextElement() from RenderTextControl to HTMLTextFormControlElement
3179         https://bugs.webkit.org/show_bug.cgi?id=64134
3180
3181         Reviewed by Kent Tamura.
3182
3183         Moved innerTextElement from RenderTextControl to HTMLTextFormControlElement. It is implemented by
3184         HTMLInputElement and HTMLTextAreaElement instead of RenderTextControlSingleLine and
3185         RenderTextControlMultiLine.
3186
3187         This refactoring removes the indirection through RenderTextControl and makes the ownership of
3188         shadow DOM for input and textarea elements clear. Accessing the shadow DOM of input and textarea elements
3189         are now less error prone because it no longer depends on the lifetime of the render tree.
3190
3191         * accessibility/AccessibilityRenderObject.cpp:
3192         (WebCore::AccessibilityRenderObject::indexForVisiblePosition): Access innerTextElement via
3193         HTMLTextFormControlElement.
3194         * dom/Node.cpp:
3195         (WebCore::traverseTreeAndMark): No longer calls innerTextElement because this was a work-around
3196         needed before making input and textarea elements use the new shadow DOM model.
3197         * editing/TextIterator.cpp:
3198         (WebCore::TextIterator::handleReplacedElement): Access innerTextElement via HTMLTextFormControlElement.
3199         * html/HTMLFormControlElement.cpp:
3200         (WebCore::hasVisibleTextArea): Takes innerTextElement.
3201         (WebCore::HTMLTextFormControlElement::setSelectionRange): Calls innerTextElement().
3202         (WebCore::HTMLTextFormControlElement::selection): Ditto.
3203         (WebCore::HTMLTextFormControlElement::selectionStart): Ditto; no longer uses a temporary local variable
3204         for innerTextElement because innerTextElement() no longer depends on the lifetime of the render tree.
3205         (WebCore::HTMLTextFormControlElement::selectionEnd): Ditto.
3206         * html/HTMLFormControlElement.h:
3207         * html/HTMLTextAreaElement.cpp:
3208         (WebCore::HTMLTextAreaElement::innerTextElement): Added.
3209         * html/HTMLTextAreaElement.h:
3210         * rendering/RenderTextControl.cpp:
3211         (WebCore::RenderTextControl::textFormControlElement): Made this function a const member.
3212         (WebCore::RenderTextControl::innerTextElement): Added.
3213         * rendering/RenderTextControl.h:
3214         * rendering/RenderTextControlMultiLine.cpp:
3215         * rendering/RenderTextControlMultiLine.h:
3216         * rendering/RenderTextControlSingleLine.cpp:
3217         * rendering/RenderTextControlSingleLine.h:
3218
3219 2011-07-11  Tony Chang  <tony@chromium.org>
3220
3221         rename RenderObject::isFlexibleBox to isDeprecatedFlexibleBox
3222         https://bugs.webkit.org/show_bug.cgi?id=64217
3223
3224         Reviewed by Ojan Vafai.
3225
3226         This is to make way for the new flexbox needing a similar method.
3227         RenderObject also has isFlexingChildren() and isStretchingChildren(),
3228         but we may be able to use those for the new flexbox as well so I
3229         didn't rename them.
3230
3231         No new tests, just refactoring.
3232
3233         * rendering/RenderBlock.cpp:
3234         (WebCore::RenderBlock::removeChild):
3235         (WebCore::RenderBlock::expandsToEncloseOverhangingFloats):
3236         (WebCore::shouldCheckLines):
3237         * rendering/RenderBox.cpp:
3238         (WebCore::RenderBox::removeFloatingOrPositionedChildFromBlockLists):
3239         (WebCore::RenderBox::computeLogicalWidth):
3240         (WebCore::RenderBox::sizesToIntrinsicLogicalWidth):
3241         (WebCore::RenderBox::computeLogicalHeight):
3242         * rendering/RenderDeprecatedFlexibleBox.cpp:
3243         (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
3244         * rendering/RenderDeprecatedFlexibleBox.h:
3245         (WebCore::RenderDeprecatedFlexibleBox::isDeprecatedFlexibleBox):
3246         * rendering/RenderObject.h:
3247         (WebCore::RenderObject::isDeprecatedFlexibleBox):
3248
3249 2011-07-11  Nate Chapin  <japhet@chromium.org>
3250
3251         [Chromium] Ensure we don't crash when an
3252         HTMLSelectElement mouse release event removes
3253         the element from the DOM.
3254         https://bugs.webkit.org/show_bug.cgi?id=64295
3255
3256         Reviewed by Dimitri Glazkov.
3257
3258         Manual test only because the crash requires a
3259         real popup menu, which DRT doesn't provide.
3260
3261         * manual-tests/chromium/popup-menu-crash.html: Added.
3262         * platform/chromium/PopupMenuChromium.cpp:
3263         (WebCore::PopupContainer::handleMouseReleaseEvent):
3264
3265 2011-07-11  Mike Reed  <reed@google.com>
3266
3267         [skia] remove platform helpers for gradients and patterns
3268         https://bugs.webkit.org/show_bug.cgi?id=64281
3269
3270         Reviewed by Stephen White.
3271
3272         No new tests. fixes canvas/philip/tests/2d.gradient.object.update.html
3273
3274         Remove (now empty) platform helpers for fill/stroke gradients/patterns. We now pickup the platformGradient
3275         and platformPattern fresh when they're needed, so we can see any edits that have occurred to them
3276         2d.gradient.object.update.html sets the fillgradient, and then edits the gradient object. This CL allows
3277         us to see that edit.
3278
3279         * platform/graphics/GraphicsContext.cpp:
3280         (WebCore::GraphicsContext::setStrokePattern):
3281         (WebCore::GraphicsContext::setFillPattern):
3282         (WebCore::GraphicsContext::setStrokeGradient):
3283         (WebCore::GraphicsContext::setFillGradient):
3284         * platform/graphics/GraphicsContext.h:
3285         * platform/graphics/skia/GraphicsContextSkia.cpp:
3286         (WebCore::GraphicsContext::platformInit):
3287         * platform/graphics/skia/PlatformContextSkia.cpp:
3288         (WebCore::PlatformContextSkia::State::State):
3289         (WebCore::PlatformContextSkia::State::~State):
3290         (WebCore::PlatformContextSkia::PlatformContextSkia):
3291         (WebCore::PlatformContextSkia::drawRect):
3292         (WebCore::PlatformContextSkia::setupShader):
3293         (WebCore::PlatformContextSkia::setupPaintForFilling):
3294         (WebCore::PlatformContextSkia::setupPaintForStroking):
3295         (WebCore::PlatformContextSkia::setFillColor):
3296         (WebCore::PlatformContextSkia::setStrokeColor):
3297         (WebCore::PlatformContextSkia::canAccelerate):
3298         * platform/graphics/skia/PlatformContextSkia.h:
3299         (WebCore::PlatformContextSkia::setGraphicsContext):
3300
3301 2011-07-11  Young Han Lee  <joybro@company100.net>
3302
3303         Reviewed by Simon Fraser.
3304
3305         Transition LayoutTest using pause API shows wrong result if it tries to pause a transition after its delay time.
3306         https://bugs.webkit.org/show_bug.cgi?id=63859
3307
3308         The existing code to set the m_startTime haven't worked because 
3309         the animation is not the right state to accept the start event. 
3310         This patch just sets the values directly instead of using event.
3311
3312         Test: transitions/delay.html
3313
3314         * page/animation/AnimationBase.cpp:
3315         (WebCore::AnimationBase::freezeAtTime):
3316
3317 2011-07-11  Ryosuke Niwa  <rniwa@webkit.org>
3318
3319         Move selection related code from RenderTextControl to HTMLTextFormControlElement
3320         https://bugs.webkit.org/show_bug.cgi?id=64133
3321
3322         Reviewed by Dimitri Glazkov.
3323
3324         Moved selectionStart, selectionEnd, hasVisibleTextArea, setSelectionRange, setContainerAndOffsetForRange
3325         and selection from RenderTextControl.cpp to HTMLFormControlElement.cpp.
3326
3327         This refactoring removes RenderTextControl's dependency on FrameSelection.
3328
3329         * accessibility/AccessibilityRenderObject.cpp:
3330         (WebCore::AccessibilityRenderObject::selectedText): Calls HTMLTextFromControl::selectedText.
3331         (WebCore::AccessibilityRenderObject::selectedTextRange): Calls selectionStart and selectionEnd.
3332         (WebCore::AccessibilityRenderObject::setSelectedTextRange): Ditto.
3333         * html/HTMLFormControlElement.cpp:
3334         (WebCore::HTMLTextFormControlElement::selectedText): Extracted from AccessibilityRenderObject::selectedText.
3335         (WebCore::hasVisibleTextArea): Added.
3336         (WebCore::HTMLTextFormControlElement::setSelectionRange): Merged with the function of the same name in RenderTextControl.
3337         (WebCore::HTMLTextFormControlElement::selectionStart): Calls computeSelectionStart instead of RenderTextControl::selectionStart.
3338         (WebCore::HTMLTextFormControlElement::computeSelectionStart): Moved from RenderTextControl::selectionStart.
3339         (WebCore::HTMLTextFormControlElement::selectionEnd): Calls computeSelectionEnd instead of RenderText::selectionEnd.
3340         (WebCore::HTMLTextFormControlElement::computeSelectionEnd): Moved from RenderTextControl::selectionStart.
3341         (WebCore::setContainerAndOffsetForRange): Moved from RenderTextControl.cpp.
3342         (WebCore::HTMLTextFormControlElement::selection): Merged with the function of the same name in RenderTextControl.
3343         (WebCore::HTMLTextFormControlElement::restoreCachedSelection): Calls computeSelectionStart and computeSelectionEnd instead of
3344         RenderTextControl::selectionStart and RenderTextControl::selectionEnd.
3345         (WebCore::HTMLTextFormControlElement::selectionChanged): Calls selectionStart and selectionEnd.
3346         * html/HTMLFormControlElement.h:
3347         * html/HTMLInputElement.cpp:
3348         (WebCore::HTMLInputElement::setValue): Calls setSelectionRange.
3349         * rendering/RenderTextControl.cpp:
3350         (WebCore::RenderTextControl::textFormControlElement): Added.
3351         * rendering/RenderTextControl.h:
3352
3353 2011-07-11  Andreas Kling  <kling@webkit.org>
3354
3355         Reviewed by Oliver Hunt.
3356
3357         Canvas: Use fast, approximate dirty rects for stroke()
3358         https://bugs.webkit.org/show_bug.cgi?id=59764
3359
3360         No new tests, this is an optimization.
3361
3362         * html/canvas/CanvasRenderingContext2D.cpp:
3363         (WebCore::CanvasRenderingContext2D::stroke): Instead of using
3364         Path::strokeBoundingRect() to calculate the exact bounding rect
3365         for a path stroke, get the Path::boundingRect() and inflate it by
3366         miterLimit + lineWidth to get a slightly oversized dirty rect
3367         in a fraction of the time.
3368
3369 2011-07-11  Andrey Kosyakov  <caseq@chromium.org>
3370
3371         Reviewed by Pavel Feldman.
3372
3373         Web Inspector: [refactoring] Remove dependencies of components requiring network resource list from network panel
3374         https://bugs.webkit.org/show_bug.cgi?id=62477
3375
3376         * inspector/front-end/AuditsPanel.js:
3377         * inspector/front-end/ExtensionServer.js:
3378         (WebInspector.ExtensionServer):
3379         (WebInspector.ExtensionServer.prototype._inspectedURLChanged):
3380         (WebInspector.ExtensionServer.prototype._onGetHAR):
3381         (WebInspector.ExtensionServer.prototype.initExtensions):
3382         * inspector/front-end/HAREntry.js:
3383         (WebInspector.HARLog):
3384         (WebInspector.HARLog.prototype.build):
3385         * inspector/front-end/NetworkManager.js:
3386         (WebInspector.NetworkLog):
3387         (WebInspector.NetworkLog.prototype.get resources):
3388         (WebInspector.NetworkLog.prototype._onInspectedURLChanged):
3389         (WebInspector.NetworkLog.prototype._onResourceStarted):
3390         * inspector/front-end/NetworkPanel.js:
3391         (WebInspector.NetworkPanel.prototype._reset):
3392         (WebInspector.NetworkPanel.prototype._copyAll):
3393         (WebInspector.NetworkPanel.prototype._exportAll):
3394         * inspector/front-end/inspector.js:
3395         (WebInspector.reset):
3396
3397 2011-07-11  Pavel Podivilov  <podivilov@chromium.org>
3398
3399         Web Inspector: make SourceFrame a View.
3400         https://bugs.webkit.org/show_bug.cgi?id=64274
3401
3402         Reviewed by Pavel Feldman.
3403
3404         * inspector/front-end/SourceFrame.js:
3405         (WebInspector.SourceFrame):
3406         (WebInspector.SourceFrame.createSearchRegex):
3407         (WebInspector.SourceFrame.prototype.show):
3408         (WebInspector.SourceFrame.prototype.hide):
3409         (WebInspector.SourceFrame.prototype._beforeTextChanged):
3410         (WebInspector.SourceFrame.prototype._afterTextChanged):
3411         (WebInspector.SourceFrame.prototype._initializeTextViewer):
3412         (WebInspector.SourceFrame.prototype.performSearch.doFindSearchMatches):
3413         (WebInspector.SourceFrame.prototype.performSearch):
3414         (WebInspector.SourceFrame.prototype._populateTextAreaContextMenu):
3415         (WebInspector.SourceFrame.prototype._suggestedFileName):
3416         (WebInspector.SourceFrame.prototype._doubleClick):
3417         (WebInspector.SourceFrame.prototype._cancelEditing):
3418         (WebInspector.TextViewerDelegateForSourceFrame):
3419         (WebInspector.TextViewerDelegateForSourceFrame.prototype.doubleClick):
3420         (WebInspector.TextViewerDelegateForSourceFrame.prototype.beforeTextChanged):
3421         (WebInspector.TextViewerDelegateForSourceFrame.prototype.afterTextChanged):
3422         (WebInspector.TextViewerDelegateForSourceFrame.prototype.commitEditing):
3423         (WebInspector.TextViewerDelegateForSourceFrame.prototype.cancelEditing):
3424         (WebInspector.TextViewerDelegateForSourceFrame.prototype.populateLineGutterContextMenu):
3425         (WebInspector.TextViewerDelegateForSourceFrame.prototype.populateTextAreaContextMenu):
3426         (WebInspector.TextViewerDelegateForSourceFrame.prototype.suggestedFileName):
3427         * inspector/front-end/TextViewer.js:
3428         (WebInspector.TextViewerDelegate.prototype.populateLineGutterContextMenu):
3429
3430 2011-07-11  Noel Gordon  <noel.gordon@gmail.com>
3431
3432         Reviewed by Adam Roben.
3433
3434         Forward focus events to windowless plugins on the windows port.
3435         https://bugs.webkit.org/show_bug.cgi?id=62375
3436
3437         * plugins/win/PluginViewWin.cpp:
3438         (WebCore::PluginView::setFocus): Forward focus events if the plugin is windowless.
3439
3440 2011-07-11  Shinya Kawanaka  <shinyak@google.com>
3441
3442         Added accessibility notification when value is changed.
3443         https://bugs.webkit.org/show_bug.cgi?id=64256
3444
3445         Notifies the value change of range input when accessibility is enabled.
3446
3447         Reviewed by Kent Tamura.
3448
3449         Covered by existing tests.
3450
3451         * html/RangeInputType.cpp:
3452         (WebCore::RangeInputType::handleKeydownEvent):
3453           Added accessibility notification when value is changed.
3454
3455 2011-07-08  Mikhail Naganov  <mnaganov@chromium.org>
3456
3457         Web Inspector: Fix resizing of sidebar pane in Timeline and Profile panels.
3458         https://bugs.webkit.org/show_bug.cgi?id=64161
3459
3460         Reviewed by Pavel Feldman.
3461
3462         * inspector/front-end/ProfilesPanel.js:
3463         (WebInspector.ProfilesPanel.prototype.updateMainViewWidth):
3464         * inspector/front-end/TimelineOverviewPane.js:
3465         (WebInspector.TimelineOverviewPane.prototype.updateMainViewWidth):
3466
3467 2011-07-11  Pavel Feldman  <pfeldman@google.com>
3468
3469         Web Inspector: [REGRESSION r89753-89754] highlight does not respect scroller location.
3470         https://bugs.webkit.org/show_bug.cgi?id=63982
3471
3472         Rolling out 89760, 89756, 89754, 89753 for breaking inspector highlight.
3473
3474         Reviewed by Yury Semikhatsky.
3475
3476         * WebCore.exp.in:
3477         * inspector/DOMNodeHighlighter.cpp:
3478         (WebCore::DOMNodeHighlighter::drawNodeHighlight):
3479         * page/FrameView.cpp:
3480         * page/FrameView.h:
3481         * platform/ScrollView.h:
3482         * platform/Widget.cpp:
3483         * platform/Widget.h:
3484         * rendering/RenderBox.cpp:
3485         (WebCore::RenderBox::mapLocalToContainer):
3486         * rendering/RenderBox.h:
3487         * rendering/RenderInline.cpp:
3488         (WebCore::RenderInline::mapLocalToContainer):
3489         * rendering/RenderInline.h:
3490         * rendering/RenderObject.cpp:
3491         (WebCore::RenderObject::mapLocalToContainer):
3492         (WebCore::RenderObject::localToContainerQuad):
3493         * rendering/RenderObject.h:
3494         (WebCore::RenderObject::localToAbsoluteQuad):
3495         * rendering/RenderView.cpp:
3496         (WebCore::RenderView::mapLocalToContainer):
3497         * rendering/RenderView.h:
3498         * rendering/svg/RenderSVGForeignObject.cpp:
3499         (WebCore::RenderSVGForeignObject::mapLocalToContainer):
3500         * rendering/svg/RenderSVGForeignObject.h:
3501         * rendering/svg/RenderSVGInline.cpp:
3502         (WebCore::RenderSVGInline::mapLocalToContainer):
3503         * rendering/svg/RenderSVGInline.h:
3504         * rendering/svg/RenderSVGModelObject.cpp:
3505         (WebCore::RenderSVGModelObject::mapLocalToContainer):
3506         * rendering/svg/RenderSVGModelObject.h:
3507         * rendering/svg/RenderSVGRoot.cpp:
3508         (WebCore::RenderSVGRoot::mapLocalToContainer):
3509         * rendering/svg/RenderSVGRoot.h:
3510         * rendering/svg/RenderSVGText.cpp:
3511         (WebCore::RenderSVGText::mapLocalToContainer):
3512         * rendering/svg/RenderSVGText.h:
3513         * rendering/svg/SVGRenderSupport.cpp:
3514         (WebCore::SVGRenderSupport::mapLocalToContainer):
3515         * rendering/svg/SVGRenderSupport.h:
3516
3517 2011-07-11  Mustafizur Rahaman  <mustaf.here@gmail.com>
3518
3519         Reviewed by James Robinson.
3520
3521         Fix LayoutTests/canvas/philip/tests/2d.composite.uncovered.fill.destination-atop.html
3522         https://bugs.webkit.org/show_bug.cgi?id=48292
3523         
3524         and
3525         
3526         Fix LayoutTests/canvas/philip/tests/2d.composite.uncovered.pattern.destination-atop.html
3527         https://bugs.webkit.org/show_bug.cgi?id=48302
3528
3529         * html/canvas/CanvasRenderingContext2D.cpp:
3530         (WebCore::CanvasRenderingContext2D::shouldDisplayTransparencyElsewhere): Added CompositeDestinationAtop 
3531         to draw transparency elsewhere for destination-atop
3532
3533 2011-07-08  Mikhail Naganov  <mnaganov@chromium.org>
3534
3535         Web Inspector: [Chromium] Get rid of flickering "Please wait" message in Heap profiler.
3536         https://bugs.webkit.org/show_bug.cgi?id=61175
3537
3538         The message has been replaced with spinner icons appearing instead of profile's
3539         icon. As each profile owns a worker, they run independently, and there can be
3540         multiple spinners at the same time.
3541
3542         Reviewed by Pavel Feldman.
3543
3544         * WebCore.gypi:
3545         * WebCore.vcproj/WebCore.vcproj:
3546         * inspector/front-end/DetailedHeapshotGridNodes.js:
3547         (WebInspector.HeapSnapshotGridNode.prototype._populate.sorted):
3548         (WebInspector.HeapSnapshotGridNode.prototype._populate):
3549         (WebInspector.HeapSnapshotGridNode.prototype.populateChildren.childrenRetrieved):
3550         (WebInspector.HeapSnapshotGridNode.prototype.populateChildren):
3551         * inspector/front-end/DetailedHeapshotView.js:
3552         (WebInspector.HeapSnapshotSortableDataGrid.prototype.sortingChanged):
3553         (WebInspector.HeapSnapshotRetainingPathsList.prototype.showNext):
3554         (WebInspector.HeapSnapshotRetainingPathsList.prototype.searchCancelled):
3555         (WebInspector.DetailedHeapshotView.profileCallback):
3556         (WebInspector.DetailedHeapshotView):
3557         (WebInspector.DetailedHeapshotView.prototype._changeBase.baseProfileLoaded):
3558         (WebInspector.DetailedHeapshotView.prototype._changeBase):
3559         (WebInspector.DetailedHeapshotView.prototype.processLoadedSnapshot):
3560         (WebInspector.DetailedHeapshotView.prototype._changeView):
3561         * inspector/front-end/HeapSnapshotProxy.js:
3562         (WebInspector.HeapSnapshotWorker):
3563         (WebInspector.HeapSnapshotWorker.prototype.dispose):
3564         (WebInspector.HeapSnapshotWorker.prototype.startCheckingForLongRunningCalls):
3565         (WebInspector.HeapSnapshotWorker.prototype._checkLongRunningCalls):
3566         (WebInspector.HeapSnapshotProxyObject.prototype.callMethod):
3567         (WebInspector.HeapSnapshotProxyObject.prototype.get worker):
3568         * inspector/front-end/Images/spinnerActive.gif: Added. Generated using ajaxload.info.
3569         * inspector/front-end/Images/spinnerActiveSelected.gif: Added. Generated using ajaxload.info.
3570         * inspector/front-end/Images/spinnerInactive.gif: Added. Generated using ajaxload.info.
3571         * inspector/front-end/Images/spinnerInactiveSelected.gif: Added. Generated using ajaxload.info.
3572         * inspector/front-end/PleaseWaitMessage.js: Removed.
3573         * inspector/front-end/ProfilesPanel.js:
3574         (WebInspector.ProfilesPanel.prototype._addProfileHeader):
3575         (WebInspector.ProfilesPanel.prototype.loadHeapSnapshot.setProfileWait):
3576         (WebInspector.ProfilesPanel.prototype.loadHeapSnapshot):
3577         (WebInspector.ProfilesPanel.prototype._finishHeapSnapshot.parsed):
3578         (WebInspector.ProfilesPanel.prototype._finishHeapSnapshot):
3579         (WebInspector.ProfilesPanel.prototype._reportHeapSnapshotProgress):
3580         * inspector/front-end/SidebarTreeElement.js:
3581         (WebInspector.SidebarTreeElement.prototype.set wait):
3582         * inspector/front-end/WebKit.qrc:
3583         * inspector/front-end/heapProfiler.css:
3584         (.heap-snapshot-sidebar-tree-item.wait .icon):
3585         (.heap-snapshot-sidebar-tree-item.wait.selected .icon):
3586         (body.inactive .heap-snapshot-sidebar-tree-item.wait .icon):
3587         (body.inactive .heap-snapshot-sidebar-tree-item.wait.selected .icon):
3588         * inspector/front-end/inspector.html:
3589
3590 2011-07-10  Patrick Gansterer  <paroga@webkit.org>
3591
3592         Generate conditional include statements in CodeGeneratorJS
3593         https://bugs.webkit.org/show_bug.cgi?id=64231
3594
3595         Reviewed by Brent Fulgham.
3596
3597         Suround headers with a correspondig #if ENABLE() line.
3598         This allows us to generate bindings only of required IDL files.
3599
3600         Changing the current preprocessor statements to the Conditional attribute
3601         in a next step helps in getting rid of calls to the preprocessor,
3602         which causes so much pain on a natvie Windows environment. 
3603
3604         * bindings/scripts/CodeGeneratorJS.pm:
3605         (GenerateImplementation):
3606         (WriteData):
3607
3608 2011-07-10  Patrick Gansterer  <paroga@webkit.org>
3609
3610         Remove array size from generated JSC binding tables
3611         https://bugs.webkit.org/show_bug.cgi?id=64229
3612
3613         Reviewed by Brent Fulgham.
3614
3615         Because many items in the array are surrounded with #if(ENABLE_XXX) lines,
3616         the array size isn't fix and correct in all cases.
3617         So let the compiler calculate the correct size itself.
3618
3619         * bindings/scripts/CodeGeneratorJS.pm:
3620         (GenerateHashTable):
3621         * bindings/scripts/test/JS/JSTestInterface.cpp:
3622         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
3623         * bindings/scripts/test/JS/JSTestObj.cpp:
3624         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
3625
3626 2011-07-10  Kenichi Ishibashi  <bashi@chromium.org>
3627
3628         Let plugins participate in form submission
3629         https://bugs.webkit.org/show_bug.cgi?id=13061
3630
3631         Implements HTMLObjectElement::appendFormData() so that object
3632         elements respond as form associated elements.
3633
3634         Reviewed by Anders Carlsson.
3635
3636         Test: plugins/form-value.html
3637
3638         * html/HTMLObjectElement.cpp:
3639         (WebCore::HTMLObjectElement::appendFormData): Implemented.
3640         * plugins/PluginViewBase.h:
3641         (WebCore::PluginViewBase::getFormValue): Added.
3642
3643 2011-07-10  Anders Carlsson  <andersca@apple.com>
3644
3645         WebKit2 is leaking NSCursors created by leakNamedCursor
3646         https://bugs.webkit.org/show_bug.cgi?id=64241
3647         <rdar://problem/9507151>
3648
3649         Reviewed by Oliver Hunt.
3650
3651         * platform/mac/CursorMac.mm:
3652         (WebCore::createNamedCursor):
3653         Rename this from leakNamedCursor to createNamedCursor and make it return a
3654         RetainPtr<NSCursor> instead of a raw pointer.
3655
3656         (WebCore::Cursor::ensurePlatformCursor):
3657         Don't leak cursors here. We still won't deallocate cursors during shutdown (which leakNamedCursor
3658         was said to prevent) because the cursor singletons are all allocated from the heap and are never destroyed
3659         anyway.
3660
3661 2011-07-10  Yuta Kitamura  <yutak@chromium.org>
3662
3663         WebSocket: Add useHixie76Protocol flag to WebSocketChannel and WebSocketHandshake
3664         https://bugs.webkit.org/show_bug.cgi?id=64244
3665
3666         Reviewed by Kent Tamura.
3667
3668         Get the value of Settings::useHixie76WebSocketProtocol() and save it in
3669         WebSocketChannel and WebSocketHandshake instances. Obtained flag value
3670         is not used for now.
3671
3672         No behavior change, thus no new tests.
3673
3674         * websockets/WebSocketChannel.cpp:
3675         (WebCore::WebSocketChannel::WebSocketChannel):
3676         WebSocketChannel is always created in context of Document (see
3677         ThreadableWebSocketChannel::create()).
3678         Because m_useHixie76Protocol must be passed to WebSocketHandshake
3679         constructor, WebSocketHandshake instance is allocated dynamically
3680         and stored in OwnPtr.
3681         (WebCore::WebSocketChannel::connect):
3682         (WebCore::WebSocketChannel::fail):
3683         (WebCore::WebSocketChannel::disconnect):
3684         (WebCore::WebSocketChannel::didOpen):
3685         (WebCore::WebSocketChannel::didFail):
3686         (WebCore::WebSocketChannel::processBuffer):
3687         * websockets/WebSocketChannel.h:
3688         * websockets/WebSocketHandshake.cpp:
3689         (WebCore::WebSocketHandshake::WebSocketHandshake):
3690         * websockets/WebSocketHandshake.h:
3691
3692 2011-07-10  Tom Hudson  <tomhudson@google.com>
3693
3694         Reviewed by James Robinson.
3695
3696         GraphicsContextSkia::drawConvexPolygon doesn't pay attention to shouldAntialias
3697         https://bugs.webkit.org/show_bug.cgi?id=61369
3698
3699         * platform/graphics/skia/GraphicsContextSkia.cpp:
3700         (WebCore::GraphicsContext::drawConvexPolygon): Pass the
3701         shouldAntialias parameter on to Skia.
3702
3703 2011-07-10  Yuzo Fujishima  <yuzo@google.com>
3704
3705         Fix for Bug 63968 - Add comment to explain Vector usage in FontCache::purgeInactiveFontData
3706         https://bugs.webkit.org/show_bug.cgi?id=63968
3707
3708         Reviewed by Dan Bernstein.
3709
3710         No new tests because this changes comments only.
3711
3712         * platform/graphics/FontCache.cpp:
3713         (WebCore::FontCache::purgeInactiveFontData): Add explanation why SimpleFontData is not deleted in the iteration loop.
3714
3715 2011-07-10  Emil A Eklund  <eae@chromium.org>
3716
3717         Switch updateHitTestResult to to new layout types
3718         https://bugs.webkit.org/show_bug.cgi?id=64209
3719
3720         Reviewed by Eric Seidel.
3721
3722         No new tests, no functionality changes.
3723
3724         * rendering/EllipsisBox.cpp:
3725         (WebCore::EllipsisBox::nodeAtPoint):
3726         * rendering/RenderBlock.cpp:
3727         (WebCore::RenderBlock::hitTestFloats):
3728         (WebCore::RenderBlock::updateHitTestResult):
3729         * rendering/RenderBlock.h:
3730         * rendering/RenderInline.cpp:
3731         (WebCore::RenderInline::updateHitTestResult):
3732         * rendering/RenderInline.h:
3733         * rendering/RenderLineBoxList.cpp:
3734         (WebCore::RenderLineBoxList::hitTest):
3735         * rendering/RenderObject.cpp:
3736         (WebCore::RenderObject::updateHitTestResult):
3737         * rendering/RenderObject.h:
3738         * rendering/RenderView.cpp:
3739         (WebCore::RenderView::updateHitTestResult):
3740         * rendering/RenderView.h:
3741         * rendering/svg/RenderSVGContainer.cpp:
3742         (WebCore::RenderSVGContainer::nodeAtFloatPoint):
3743         * rendering/svg/RenderSVGImage.cpp:
3744         (WebCore::RenderSVGImage::nodeAtFloatPoint):
3745         * rendering/svg/RenderSVGPath.cpp:
3746         (WebCore::RenderSVGPath::nodeAtFloatPoint):
3747         * rendering/svg/RenderSVGRoot.cpp:
3748         (WebCore::RenderSVGRoot::nodeAtPoint):
3749
3750 2011-07-10  Patrick Gansterer  <paroga@webkit.org>
3751
3752         Reviewed by Adam Barth.
3753
3754         Fix member variable order of ContextMenuItem
3755         https://bugs.webkit.org/show_bug.cgi?id=59905
3756
3757         Use the same order at decleration and assignment to silence compiler warning.
3758
3759         * platform/ContextMenuItem.h:
3760
3761 2011-07-10  Dan Bernstein  <mitz@apple.com>
3762
3763         <rdar://problem/9750062> REGRESSION: Button text missing in many iTunes Store pages
3764         https://bugs.webkit.org/show_bug.cgi?id=64236
3765
3766         Reviewed by Maciej Stachowiak.
3767
3768         Test: fast/css/empty-display-none.html
3769
3770         When an :empty selector caused an element to not have a renderer, the check for empty style
3771         change when finishing parsing the elemenet did nothing, because it could not check if the
3772         element’s current style was affected by :empty. The fix is to record the fact that the style
3773         was affected by :empty in ElementRareData in the no-renderer case.
3774
3775         * dom/Element.cpp:
3776         (WebCore::Element::recalcStyle): Clear the m_styleAffectedByEmpty flag.
3777         (WebCore::checkForEmptyStyleChange): If the style is null (meaning there is no renderer), check
3778         Element::styleAffectedByEmpty().
3779         (WebCore::Element::setStyleAffectedByEmpty): Added. Sets the flag in rare data.
3780         (WebCore::Element::styleAffectedByEmpty): Added. Checks for the flag in rare data.
3781         * dom/Element.h:
3782         * dom/ElementRareData.h:
3783         (WebCore::ElementRareData::ElementRareData): Added m_styleAffectedByEmpty and initialized it
3784         to false.
3785         * dom/NodeRenderingContext.cpp:
3786         (WebCore::NodeRendererFactory::createRendererAndStyle): If an element doesn’t need a renderer
3787         and its style is affected by :empty, record this fact in the element by calling setStyleAffectedByEmpty().
3788
3789 2011-07-10  Mark Rowe  <mrowe@apple.com>
3790
3791         Fix the build.
3792
3793         * svg/properties/SVGAttributeToPropertyMap.h: Forward-declare SVGPropertyInfo as a struct
3794         since that's what it is.
3795
3796 2011-07-09  Patrick Gansterer  <paroga@webkit.org>
3797
3798         Unreviewed WinCE build fix for r90680.
3799
3800         Repeat the change done in r90681 for all other SVGAnimated*PropertyTearOff.h files.
3801
3802         * svg/properties/SVGAnimatedEnumerationPropertyTearOff.h: Make create public and remove friendship with SVGAnimatedProperty.
3803         * svg/properties/SVGAnimatedListPropertyTearOff.h: Ditto.
3804         * svg/properties/SVGAnimatedPathSegListPropertyTearOff.h: Ditto.
3805         * svg/properties/SVGAnimatedPropertyTearOff.h: Ditto.
3806         * svg/properties/SVGAnimatedTransformListPropertyTearOff.h: Ditto.
3807
3808 2011-07-09  Nikolas Zimmermann  <nzimmermann@rim.com>
3809
3810         Add a possibility to retrieve the associated SVGAnimatedProperty object for a certain XML attribute
3811         https://bugs.webkit.org/show_bug.cgi?id=63797
3812
3813         Fix WinCE build. Funny none other platform complained.
3814
3815         * svg/properties/SVGAnimatedStaticPropertyTearOff.h: Make create public, SVGAnimatedProperty needs it - remove friendship with it.
3816
3817 2011-07-09  Nikolas Zimmermann  <nzimmermann@rim.com>
3818
3819         Add a possibility to retrieve the associated SVGAnimatedProperty object for a certain XML attribute
3820         https://bugs.webkit.org/show_bug.cgi?id=63797
3821
3822         Reviewed by Dirk Schulze.
3823
3824         In order to prepare animVal support we need a way to map a given SVG DOM attribute to a SVGAnimatedProperty.
3825         eg. SVGNames::xAttr -> SVGRectElement::xAnimated(), etc. This will be needed to update the animVal of the
3826         SVGAnimatedProperty, if an animation is running. It would required adding a new method to all SVG* classes
3827         that define animated properties. Unfortunately we already have lots of repeated code in methods like
3828         synchronizeProperty / fillAttributeToPropertyTypeMap. Look at SVGRectElement for example:
3829
3830         void SVGRectElement::synchronizeProperty(const QualifiedName& attrName)
3831         {
3832             if (attrName == anyQName()) {
3833                 synchronizeX();
3834                 synchronizeY();
3835                  ...
3836               }
3837
3838             if (attrName == SVGNames::xAttr) {
3839                 synchronizeX();
3840                 return;
3841             }
3842
3843             if (attrName == SVGNames::yAttr) {
3844                 synchronizeY();
3845                 return;
3846             }
3847             ...
3848         }
3849
3850         or
3851
3852         void SVGRectElement::fillAttributeToPropertyTypeMap()
3853         {
3854             AttributeToPropertyTypeMap& attributeToPropertyTypeMap = this->attributeToPropertyTypeMap();
3855         
3856             SVGStyledTransformableElement::fillPassedAttributeToPropertyTypeMap(attributeToPropertyTypeMap);
3857             attributeToPropertyTypeMap.set(SVGNames::xAttr, AnimatedLength);
3858             attributeToPropertyTypeMap.set(SVGNames::yAttr, AnimatedLength);
3859             ...
3860         }
3861
3862         These lookups are all performed dynamically. Each synchronizeProperty() call does a lot of comparisons.
3863         fillAttributeToPropertyTypeMap() isn't that bad as the result is cached in a static HashMap per-SVGRectElement.
3864         There's no reason to do these things dynamically!
3865
3866         Inspired by JSC, I'm adding a "static const SVGPropertyInfo s_fooPropertyInfo" object for each animated SVG property.
3867         For example, for SVGRectElements SVGAnimatedLength x property we're storing:
3868         - "AnimatedPropertyType type" (AnimatedLength -- note the enum was named AnimatedAttributeType, I renamed it to AnimatedPropertyType for clarity)
3869         - "const QualifiedName& attributeName" (SVGNames::xAttr)
3870         - "const AtomicString& propertyIdentifier" (SVGNames::xAttr.localName() -- only different if N-wrappers map to a single XML DOM attribute, eg. orientAttr)
3871         - "SynchronizeProperty synchronizeProperty" (callback to SVGRectElement::synchronizeX)
3872         - "LookupOrCreateWrapperForAnimatedProperty lookupOrCreateWrapperForAnimatedProperty" (callback to SVGRectElement::xAnimated)
3873
3874         Using this information, we can replace all the various synchronizeProperty/fillAttributeToPropertyMap implementations, with a single one in SVGElement.
3875         All these are auto-generated, using the standard macros used to define/declare SVG animated properties. This required several changes to the macros.
3876         Here's a summary:
3877     
3878         #1) In all headers, wrap DECLARE_ANIMATED_* calls, in BEGIN_DECLARE_ANIMATED_PROPERTIES(ClassName) / END_DECLARE_ANIMATED_PROPERTIES blocks.
3879         
3880             Sample change for SVGRectElement:
3881             -    DECLARE_ANIMATED_LENGTH(X, x)
3882             -    DECLARE_ANIMATED_LENGTH(Y, y)
3883             -    ...
3884
3885             +    BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGRectElement)
3886             +        DECLARE_ANIMATED_LENGTH(X, x)
3887             +        DECLARE_ANIMATED_LENGTH(Y, y)
3888             +         ...
3889             +    END_DECLARE_ANIMATED_PROPERTIES
3890
3891         #2) In all cpp files, add a new section wrapped in BEGIN_REGISTER_ANIMATED_PROPERTIES(ClassName / END_REGISTER_ANIMATED_PROPERTIES blocks:
3892
3893             Sample change for SVGRectElement:
3894             +BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGRectElement)
3895             +    REGISTER_LOCAL_ANIMATED_PROPERTY(x)
3896             +    REGISTER_LOCAL_ANIMATED_PROPERTY(y)
3897             +    ...
3898             +    REGISTER_PARENT_ANIMATED_PROPERTIES(SVGStyledTransformableElement)
3899             +    REGISTER_PARENT_ANIMATED_PROPERTIES(SVGTests)
3900             +END_REGISTER_ANIMATED_PROPERTIES
3901
3902             This is the main piece of the logic that replaces the manual synchronizeProperty/fillAttributeToPropertyMap implementation. It expands to following:
3903
3904             SVGAttributeToPropertyMap& SVGRectElement::attributeToPropertyMap()
3905             {
3906                 DEFINE_STATIC_LOCAL(SVGAttributeToPropertyMap, s_attributeToPropertyMap, ());
3907             }
3908
3909             static void registerAnimatedPropertiesForSVGRectElement()
3910             {
3911                 SVGAttributeToPropertyMap& map = SVGRectElement::attributeToPropertyMap();
3912                 if (!map.isEmpty())
3913                     return;
3914                 map.addProperty(SVGRectElement::xPropertyInfo());
3915                 map.addProperty(SVGRectElement::yPropertyInfo());
3916                 ...
3917                 map.addProperties(SVGStyledTransformableElement::attributeToPropertyMap());
3918                 map.addProperties(SVGTests::attributeToPropertyMap());
3919             }
3920
3921             A single-instance of SVGAttributeToPropertyMap is created for each SVG*Element. The constructor of SVGRectElement is supposed to call
3922             registerAnimatedPropertiesForSVGRectElement(), which collects all properties of SVGRectElement and all its parent classes and stores them
3923             in a Vector<const SVGPropertyInfo*>. This Vector is stored in a HashMap<QualifiedName, Vector<const SVGPropertyInfo*> > where the key
3924             is the attribute name (eg. SVGNames::xAttr -> SVGRectElement::xPropertyInfo). This is only done _once_ per SVGRectElement.
3925
3926             SVGElement contains a "virtual SVGAttributeToPropertyMap& localAttributeToPropertyMap()" method, and SVGRectElement overrides it
3927             and returns SVGRectElement::attributeToPropertyMap() (which is static!) -- this is hidden again in the macros, no need to write any code.
3928
3929             SVGAttributeToPropertyMap provides following API:
3930             - bool synchronizeProperty(SVGElement* contextElement, const QualifiedName& attributeName)
3931             - void synchronizeProperties(SVGElement* contextElement)
3932             
3933                 A generic way to synchronize a SVGAnimatedProperty with its XML DOM attribute. Any SVG DOM change to eg. <rect>s x property will now trigger
3934                 contextElement->localAttributeToPropertyMap().synchronizeProperty(this, SVGNames::xAttr)
3935                 The SVGAttributeToPropertyMap will ask its HashMap for the Vector containing the properties for SVGNames::xAttr (in that case, just one xAnimated()).
3936
3937             - void animatedPropertyTypeForAttribute(const QualifiedName& attributeName, Vector<AnimatedPropertyType>& propertyTypes)
3938
3939                 This method replaces the fillAttributeToPropertyMap implementations everywhere.
3940         
3941             - void animatedPropertiesForAttribute(SVGElement* contextElement, const QualifiedName& attributeName, Vector<RefPtr<SVGAnimatedProperty> >& properties);
3942
3943                 This method is not used yet, but allows us to collect all SVGAnimatedProperties for a QualifiedName -- the initial goal for this patch.
3944
3945         #3) In all cpp files, add a call to "registerAnimatedPropertiesForClassName()" in the constructor. Forgetting this will result in a compile error.
3946
3947         Doesn't affect any tests.
3948
3949         * CMakeLists.txt:
3950         * GNUmakefile.list.am:
3951         * WebCore.gypi:
3952         * WebCore.pro:
3953         * WebCore.vcproj/WebCore.vcproj:
3954         * WebCore.xcodeproj/project.pbxproj:
3955         * bindings/scripts/CodeGeneratorJS.pm:
3956         (NativeToJSValue):
3957         * bindings/scripts/CodeGeneratorObjC.pm:
3958         (GenerateImplementation):
3959         * bindings/scripts/CodeGeneratorV8.pm:
3960         (GenerateNormalAttrGetter):
3961         * svg/SVGAElement.cpp:
3962         (WebCore::SVGAElement::SVGAElement):
3963         * svg/SVGAElement.h:
3964         (WebCore::SVGAElement::synchronizeRequiredFeatures):
3965         (WebCore::SVGAElement::synchronizeRequiredExtensions):
3966         (WebCore::SVGAElement::synchronizeSystemLanguage):
3967         * svg/SVGAltGlyphElement.cpp:
3968         (WebCore::SVGAltGlyphElement::SVGAltGlyphElement):
3969         * svg/SVGAltGlyphElement.h:
3970         * svg/SVGAnimateElement.cpp:
3971         (WebCore::SVGAnimateElement::SVGAnimateElement):
3972         (WebCore::SVGAnimateElement::hasValidAttributeType):
3973         (WebCore::SVGAnimateElement::determineAnimatedPropertyType):
3974         (WebCore::SVGAnimateElement::determinePropertyValueTypes):
3975         (WebCore::SVGAnimateElement::calculateAnimatedValue):
3976         (WebCore::SVGAnimateElement::calculateFromAndToValues):
3977         (WebCore::SVGAnimateElement::calculateFromAndByValues):
3978         (WebCore::SVGAnimateElement::resetToBaseValue):
3979         (WebCore::SVGAnimateElement::applyResultsToTarget):
3980         (WebCore::SVGAnimateElement::calculateDistance):
3981         (WebCore::SVGAnimateElement::ensureAnimator):
3982         * svg/SVGAnimateElement.h:
3983         * svg/SVGAnimateTransformElement.cpp:
3984         (WebCore::SVGAnimateTransformElement::hasValidAttributeType):
3985         (WebCore::SVGAnimateTransformElement::determineAnimatedPropertyType):
3986         (WebCore::SVGAnimateTransformElement::resetToBaseValue):
3987         (WebCore::SVGAnimateTransformElement::calculateAnimatedValue):
3988         (WebCore::SVGAnimateTransformElement::applyResultsToTarget):
3989         * svg/SVGAnimateTransformElement.h:
3990         * svg/SVGAnimatedAngle.h:
3991         * svg/SVGAnimatedBoolean.h:
3992         * svg/SVGAnimatedEnumeration.h:
3993         * svg/SVGAnimatedInteger.h:
3994         * svg/SVGAnimatedLength.h:
3995         * svg/SVGAnimatedLengthList.h:
3996         * svg/SVGAnimatedNumber.h:
3997         * svg/SVGAnimatedNumberList.h:
3998         * svg/SVGAnimatedPreserveAspectRatio.h:
3999         * svg/SVGAnimatedRect.h:
4000         * svg/SVGAnimatedString.h:
4001         * svg/SVGAnimatedTransformList.h:
4002         * svg/SVGAnimatedType.cpp:
4003         (WebCore::SVGAnimatedType::SVGAnimatedType):
4004         * svg/SVGAnimatedType.h:
4005         (WebCore::SVGAnimatedType::type):
4006         * svg/SVGAnimatedTypeAnimator.h:
4007         (WebCore::SVGAnimatedTypeAnimator::SVGAnimatedTypeAnimator):
4008         * svg/SVGAnimationElement.cpp:
4009         (WebCore::SVGAnimationElement::SVGAnimationElement):
4010         (WebCore::SVGAnimationElement::currentValuesForValuesAnimation):
4011         * svg/SVGAnimationElement.h:
4012         (WebCore::SVGAnimationElement::synchronizeRequiredFeatures):
4013         (WebCore::SVGAnimationElement::synchronizeRequiredExtensions):
4014         (WebCore::SVGAnimationElement::synchronizeSystemLanguage):
4015         * svg/SVGAnimatorFactory.h:
4016         (WebCore::SVGAnimatorFactory::create):
4017         * svg/SVGCircleElement.cpp:
4018         (WebCore::SVGCircleElement::SVGCircleElement):
4019         * svg/SVGCircleElement.h:
4020         (WebCore::SVGCircleElement::synchronizeRequiredFeatures):
4021         (WebCore::SVGCircleElement::synchronizeRequiredExtensions):
4022         (WebCore::SVGCircleElement::synchronizeSystemLanguage):
4023         * svg/SVGClipPathElement.cpp:
4024         (WebCore::SVGClipPathElement::SVGClipPathElement):
4025         * svg/SVGClipPathElement.h:
4026         (WebCore::SVGClipPathElement::synchronizeRequiredFeatures):
4027         (WebCore::SVGClipPathElement::synchronizeRequiredExtensions):
4028         (WebCore::SVGClipPathElement::synchronizeSystemLanguage):
4029         * svg/SVGComponentTransferFunctionElement.cpp:
4030         (WebCore::SVGComponentTransferFunctionElement::SVGComponentTransferFunctionElement):
4031         * svg/SVGComponentTransferFunctionElement.h:
4032         * svg/SVGCursorElement.cpp:
4033         (WebCore::SVGCursorElement::SVGCursorElement):
4034         * svg/SVGCursorElement.h:
4035         (WebCore::SVGCursorElement::synchronizeRequiredFeatures):
4036   &nb