[WebGL] fast/canvas/webgl/framebuffer-object-attachment.html fails on certain platforms
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-07-25  Joshua Netterfield  <jnetterfield@rim.com>
2
3         [WebGL] fast/canvas/webgl/framebuffer-object-attachment.html fails on certain platforms
4         https://bugs.webkit.org/show_bug.cgi?id=92296
5
6         Reviewed by Rob Buis.
7
8         No new tests, because it introduces no new functionality, only fixes the above mentioned test.
9
10         * html/canvas/WebGLFramebuffer.cpp:
11         (WebCore::WebGLFramebuffer::checkStatus):
12
13 2012-07-25  Xingnan Wang  <xingnan.wang@intel.com>
14
15         IndexedDB: IDBTransaction::abort() should throw DOMException
16         https://bugs.webkit.org/show_bug.cgi?id=92069
17
18         Reviewed by Kentaro Hara.
19
20         Keep aligned with the W3C spec.
21         http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#widl-IDBTransaction-abort-void
22
23         Test: storage/indexeddb/transaction-abort.html.
24
25         * Modules/indexeddb/IDBTransaction.cpp:
26         (WebCore::IDBTransaction::abort):
27         (WebCore):
28         * Modules/indexeddb/IDBTransaction.h:
29         (IDBTransaction):
30         * Modules/indexeddb/IDBTransaction.idl:
31
32 2012-07-25  Tony Chang  <tony@chromium.org>
33
34         flexitems can overflow the flexbox due to rounding
35         https://bugs.webkit.org/show_bug.cgi?id=92163
36
37         Reviewed by Levi Weintraub.
38
39         Don't round flex item sizes and use LayoutPoint for the location of flex items.
40
41         Test: css3/flexbox/flex-rounding.html
42
43         * rendering/RenderFlexibleBox.cpp:
44         (WebCore::RenderFlexibleBox::resolveFlexibleLengths):
45         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
46         (WebCore::RenderFlexibleBox::layoutColumnReverse):
47
48 2012-07-25  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
49
50         [BlackBerry] Integrate certmgr with CredentialBackingStore
51         https://bugs.webkit.org/show_bug.cgi?id=92183
52
53         Reviewed by George Staikos.
54
55         Integrated BlackBerry::Platform::CertMgrWrapper with
56         CredentialBackingStore, when certmgr is ready we save
57         the password in certmgr and retrieve it from certmgr.
58
59         RIM PR: 171991
60         Internally reviewed by Joe Mason <jmason@rim.com>.
61
62         No new tests since there's no functional change.
63
64         * platform/network/blackberry/CredentialBackingStore.cpp:
65         (WebCore::hashCredentialInfo):
66         (WebCore):
67         (WebCore::CredentialBackingStore::CredentialBackingStore):
68         (WebCore::CredentialBackingStore::open):
69         (WebCore::CredentialBackingStore::addLogin):
70         (WebCore::CredentialBackingStore::updateLogin):
71         (WebCore::CredentialBackingStore::getLogin):
72         * platform/network/blackberry/CredentialBackingStore.h:
73         (CredentialBackingStore):
74
75 2012-07-25  Kent Tamura  <tkent@chromium.org>
76
77         REGRESSION(r121420): Performance regression of form state saving for pages with multiple forms
78         https://bugs.webkit.org/show_bug.cgi?id=91804
79
80         Reviewed by Hajime Morita.
81
82         The complexity of FormKeyGenerator::formKey() was O(N) where N is the
83         number form elements with an identical action URL, and formKey() is
84         called for every form. So, it's O(N^2). A page in www.reddit.com
85         contains hundreds of form elements with action="#". So FormController::
86         formElementsState() took a few seconds on a slow machine.
87
88         In order to avoid O(N^2) operation, storing a map from form signatures
89         to next index numbers, instead of storing existing formKey strings.
90
91         No new tests. Just a performance improvement.
92
93         Note: This is a re-landing of r123191. We rolled it out because of
94         suspicion of a performance regression. However it was innocent.
95
96         * html/FormController.cpp:
97         (FormKeyGenerator): Remove m_existingKeys. Add a map from a form
98         signature string to the next index number.
99         (WebCore::formSignature): Returns a signature string for a form, without
100         an index number. This is like "actionURL [name1 name2 ]"
101         (WebCore::FormKeyGenerator::formKey):
102         Creates a formKey string by concatenating a formSignature and #n. N is
103         obtained from m_formSignatureToNextIndexMap in O(1).
104         (WebCore::FormKeyGenerator::willDeleteForm):
105         Remove the code for m_existingKeys.
106
107 2012-07-25  Benjamin Poulain  <bpoulain@apple.com>
108
109         Initialize QualifiedName's strings from the read only data segment
110         https://bugs.webkit.org/show_bug.cgi?id=92226
111
112         Reviewed by Anders Carlsson.
113
114         Modify the initialization of static QualifiedName to initialize the AtomicString
115         with the data from the read only memory.
116
117         Overall, HTMLNames::init() gets 10% faster.
118
119         * dom/QualifiedName.cpp:
120         (WebCore::QualifiedName::QualifiedName):
121         * dom/QualifiedName.h:
122         (QualifiedName):
123         Remove the useless constructor taking a char* and get rid of the init() function.
124         The AtomicString representing the name should be constructed by the caller of QualifiedName.
125
126         Because the init() code is relatively large and is only executed once, it is important to
127         keep the AtomicString construction separate. The function createQualifiedName() was added
128         to improve the cache use. The short version let us reduce the code one more instruction per
129         call.
130
131         * dom/make_names.pl:
132         (printQualifiedNameMaker):
133         (printShortQualifiedNameMaker):
134         (printNamesCppFile):
135         (printDefinitions):
136
137 2012-07-25  Yoshifumi Inoue  <yosin@chromium.org>
138
139         [Forms] Move HTMLInputElement::updateInnerTextValue to InputType class
140         https://bugs.webkit.org/show_bug.cgi?id=92230
141
142         Reviewed by Kent Tamura.
143
144         This patch moves implementaion of HTMLInputElement::updateInnerTextValue()
145         into input type classes, removes updateInnerTextValue() from HTMLInputElement,
146         and updates call site of updateInnerTextValue().
147
148         No new tests. This patch doesn't change behavior.
149
150         * html/DateInputType.cpp:
151         (WebCore::DateInputType::handleBlurEvent): Updated call site of updateInnerTextValue().
152         * html/HTMLInputElement.cpp:
153         (WebCore::HTMLInputElement::updateType): Updated call site of updateInnerTextValue().
154         (WebCore::HTMLInputElement::parseAttribute): Updated call site of updateInnerTextValue().
155         (WebCore::HTMLInputElement::copyNonAttributePropertiesFromElement): Updated call site of updateInnerTextValue().
156         (WebCore::HTMLInputElement::setSuggestedValue): Updated call site of updateInnerTextValue().
157         * html/HTMLInputElement.h:
158         (HTMLInputElement): Removed updateInnerTextValue().
159         * html/InputType.cpp:
160         (WebCore::InputType::updateInnerTextValue): Added default implementaion.
161         * html/InputType.h:
162         (InputType): Added declaration of updateInnerTextValue().
163         * html/NumberInputType.cpp:
164         (WebCore::NumberInputType::handleBlurEvent): Updated call site of updateInnerTextValue().
165         * html/TextFieldInputType.cpp:
166         (WebCore::TextFieldInputType::setValue): Updated call site of updateInnerTextValue().
167         (WebCore::TextFieldInputType::updateInnerTextValue): Moved implementaion from HTMLInputElement.
168         * html/TextFieldInputType.h:
169         (TextFieldInputType): Added declaration of updateInnerTextValue().
170
171 2012-07-25  Dana Jansens  <danakj@chromium.org>
172
173         [chromium] Move ephemeral data for a single frame in LayerRendererChromium into a structure with a scoped lifetime equal to the frame
174         https://bugs.webkit.org/show_bug.cgi?id=92294
175
176         Reviewed by Adrienne Walker.
177
178         The LayerRendererChromium class has a number of member variables that are used
179         while drawing a single frame. Because they are member variables, their lifetimes
180         are not clear, and some are even updated between frames, which is not needed.
181
182         This change creates a LRC::DrawingFrame structure that holds the data used
183         while drawing the current frame, and an instance of this structure is held
184         and passed around to functions in LayerRendererChromium, moving all of the
185         data out from being member variables on the class to being function
186         arguments on the relevant methods.
187
188         The projection and window matrices are a part of this frame data, and are not
189         used externally, so they are removed from the CCRenderer interface and included
190         within the DrawingFrame structure.
191
192         Covered by existing tests, no change in behaviour intended.
193
194         * platform/graphics/chromium/LayerRendererChromium.cpp:
195         (WebCore::LayerRendererChromium::LayerRendererChromium):
196         (WebCore::LayerRendererChromium::viewportChanged):
197         (WebCore::LayerRendererChromium::clearFramebuffer):
198         (WebCore::LayerRendererChromium::drawFrame):
199         (WebCore::LayerRendererChromium::drawRenderPass):
200         (WebCore::LayerRendererChromium::drawQuad):
201         (WebCore::LayerRendererChromium::drawCheckerboardQuad):
202         (WebCore::LayerRendererChromium::drawDebugBorderQuad):
203         (WebCore::LayerRendererChromium::drawBackgroundFilters):
204         (WebCore::LayerRendererChromium::drawRenderPassQuad):
205         (WebCore::LayerRendererChromium::drawSolidColorQuad):
206         (WebCore::LayerRendererChromium::drawTileQuad):
207         (WebCore::LayerRendererChromium::drawYUVVideoQuad):
208         (WebCore::LayerRendererChromium::drawStreamVideoQuad):
209         (WebCore::LayerRendererChromium::drawTextureQuad):
210         (WebCore::LayerRendererChromium::drawIOSurfaceQuad):
211         (WebCore::LayerRendererChromium::finishDrawingFrame):
212         (WebCore::LayerRendererChromium::drawTexturedQuad):
213         (WebCore::LayerRendererChromium::copyTextureToFramebuffer):
214         (WebCore::LayerRendererChromium::isCurrentRenderPass):
215         (WebCore::LayerRendererChromium::useRenderPass):
216         (WebCore::LayerRendererChromium::useScopedTexture):
217         (WebCore::LayerRendererChromium::bindFramebufferToTexture):
218         (WebCore::LayerRendererChromium::setScissorToRect):
219         (WebCore::LayerRendererChromium::setDrawFramebufferRect):
220         * platform/graphics/chromium/LayerRendererChromium.h:
221         (DrawingFrame):
222         (WebCore::LayerRendererChromium::DrawingFrame::DrawingFrame):
223         (LayerRendererChromium):
224         * platform/graphics/chromium/cc/CCRenderer.h:
225         (CCRenderer):
226
227 2012-07-19  Adrienne Walker  <enne@google.com>
228
229         [chromium] Make all compositor screen space transforms operate on content rects
230         https://bugs.webkit.org/show_bug.cgi?id=91807
231
232         Reviewed by Kenneth Russell.
233
234         Previously, surface screen space transforms operated on surface
235         content space but layer screen space transforms operated on layer
236         space. For the purpose of consistency, unify these two so that they
237         both operate on content space.
238
239         No tests, because no change in behavior expected. Just a refactoring.
240
241         * platform/graphics/chromium/LayerChromium.h:
242         (LayerChromium):
243         * platform/graphics/chromium/cc/CCDebugRectHistory.cpp:
244         (WebCore::CCDebugRectHistory::savePaintRects):
245         (WebCore::CCDebugRectHistory::savePropertyChangedRects):
246         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
247         (WebCore::calculateDrawTransformsInternal):
248         (WebCore::CCLayerTreeHostCommon::findLayerThatIsHitByPoint):
249         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
250         (WebCore::::markOccludedBehindLayer):
251         (WebCore::::occluded):
252         (WebCore::::unoccludedContentRect):
253
254 2012-07-25  Dan Bernstein  <mitz@apple.com>
255
256         Hit testing in one column or in the gap between cloumns along the block axis can return a result from the wrong column
257         https://bugs.webkit.org/show_bug.cgi?id=92311
258
259         Reviewed by Anders Carlsson.
260
261         Tests: fast/multicol/hit-test-end-of-column.html
262                fast/multicol/hit-test-gap-block-axis.html
263
264         * rendering/RenderBlock.cpp:
265         (WebCore::RenderBlock::positionForPointWithInlineChildren): To prevent hits after the last
266         line on a given column from returning the next line in the next column, added a check if
267         the hit occurred within the pagination strut of a line. Covered by the first test.
268         (WebCore::RenderBlock::adjustPointToColumnContents): Added clamp-to-column logic for the
269         block-axis case. This prevents hits near the bottom of the top half of the gap from bleeding
270         into the top of the next column. Covered by the second test.
271
272 2012-07-25  David Grogan  <dgrogan@chromium.org>
273
274         IndexedDB: Make db.version return an integer if appropriate
275         https://bugs.webkit.org/show_bug.cgi?id=92195
276
277         Reviewed by Tony Chang.
278
279         Make use of the existing IDBAny mechanism to return an integer if
280         integer versions have been used.
281
282         No new tests - no change in behavior expected.
283
284         * Modules/indexeddb/IDBDatabase.cpp:
285         (WebCore::IDBDatabase::version):
286         (WebCore):
287         * Modules/indexeddb/IDBDatabase.h:
288         (IDBDatabase):
289         * Modules/indexeddb/IDBDatabase.idl:
290
291 2012-07-25  Michael Saboff  <msaboff@apple.com>
292
293         Convert HTML parser to handle 8-bit resources without converting to UChar*
294         https://bugs.webkit.org/show_bug.cgi?id=90321
295
296         Reviewed by Geoffrey Garen.
297
298         No new tests, no new functionality therefore covered by existing tests.
299
300         Changed the parsing of HTML to handle 8-bit strings without converting the 
301         whole string to 16-bits.  Primary change was to use the appropriate 
302         character pointer type (LChar* or UChar*) depending on the source string.
303         This access is abstracted in SegmentedSubstring by getCurrentChar{8,16} and
304         incrementAndGetCurrentChar{8,16} methods.  In SegmentedString, the advance()
305         and advanceAndUpdateLineNumber() methods have been refactored into a
306         state machine managed pair of function pointers.  The possible functions
307         have not only the 8 and 16 bitness factored out, they also have the 
308         "exclude line numbers" logic factored out for advanceAndUpdateLineNumber().
309         This provides a net speed-up even with the 8/16 bit testing.
310         Other changes involve using String methods to access and compare with the
311         source data.
312
313         * html/FTPDirectoryDocument.cpp:
314         (WebCore::FTPDirectoryDocumentParser::append): Changed to use currentChar()
315         instead of SegmentedString '*' operator.
316         * html/parser/HTMLEntityParser.cpp: Changed to use currentChar() instead of
317         SegmentedString '*' operator.
318         * html/parser/HTMLParserIdioms.cpp:
319         (WebCore::stripLeadingAndTrailingHTMLSpaces): Added 8-bit fast path.
320         * html/parser/HTMLSourceTracker.cpp:
321         (WebCore::HTMLSourceTracker::sourceForToken): Changed to use currentChar() instead of
322         SegmentedString '*' operator.
323         * loader/cache/CachedScript.cpp:
324         (WebCore::CachedScript::script): Updated to use new String::dataSize() method.
325         * platform/text/SegmentedString.cpp:
326         (WebCore::SegmentedString::SegmentedString):
327         (WebCore::SegmentedString::operator=):
328         (WebCore::SegmentedString::clear):
329         (WebCore::SegmentedString::append):
330         (WebCore::SegmentedString::prepend):
331         (WebCore::SegmentedString::advanceSubstring):
332         (WebCore::SegmentedString::advance): Changed to be a wrapper that invokes current 
333         advance function.
334         (WebCore::SegmentedString::advance8): Fast path advance function for 8 bit data.
335         (WebCore::SegmentedString::advance16): Fast path advance function for 16 bit data.
336         (WebCore::SegmentedString::advanceAndUpdateLineNumber8IncludeLineNumbers): Fast
337         path advanceAndUpdateLineNumber for 8 bit data when we need to update the line number.
338         (WebCore::SegmentedString::advanceAndUpdateLineNumber16IncludeLineNumbers): Fast
339         path advanceAndUpdateLineNumber for 16 bit data when we need to update the line number.
340         (WebCore::SegmentedString::advanceSlowCase): Slow case advance function for both
341         8 and 16 bit advance.
342         (WebCore::SegmentedString::advanceAndUpdateLineNumberSlowCase): Slow case
343         advanceAndUpdateLineNumber function for both 8 and 16 bit data.
344         (WebCore::SegmentedString::advanceEmpty): Advance function when input has been exhausted.
345         * platform/text/SegmentedString.h:
346         (WebCore::SegmentedSubstring::SegmentedSubstring):
347         (WebCore::SegmentedSubstring::clear):
348         (SegmentedSubstring):
349         (WebCore::SegmentedSubstring::is8Bit): New getter.
350         (WebCore::SegmentedSubstring::appendTo):
351         (WebCore::SegmentedSubstring::getCurrentChar8): New getter for the 8 bit case.
352         (WebCore::SegmentedSubstring::getCurrentChar16): New getter for the 16 bit case.
353         (WebCore::SegmentedSubstring::incrementAndGetCurrentChar8): New wrapper functions
354         that pre-increments the 8 bit pointer and returns the next character.
355         (WebCore::SegmentedSubstring::incrementAndGetCurrentChar16): New wrapper functions
356         that pre-increments the 16 bit pointer and returns the next character.
357         (WebCore::SegmentedSubstring::currentSubString):
358         (WebCore::SegmentedSubstring::getCurrentChar):
359         (WebCore::SegmentedSubstring::incrementAndGetCurrentChar):
360         (WebCore::SegmentedString::SegmentedString):
361         (WebCore::SegmentedString::push):
362         (WebCore::SegmentedString::isEmpty):
363         (WebCore::SegmentedString::lookAhead):
364         (WebCore::SegmentedString::lookAheadIgnoringCase):
365         (WebCore::SegmentedString::advance):
366         (WebCore::SegmentedString::advanceAndUpdateLineNumber):
367         (WebCore::SegmentedString::advanceAndASSERT):
368         (WebCore::SegmentedString::advanceAndASSERTIgnoringCase):
369         (WebCore::SegmentedString::advancePastNonNewline):
370         (WebCore::SegmentedString::advancePastNewlineAndUpdateLineNumber):
371         (WebCore::SegmentedString::currentChar):
372         (WebCore::SegmentedString::setSlowCase): Set advance function pointers to slow case
373         functions.
374         (WebCore::SegmentedString::decrementAndCheckLength): Decrement substring length and
375         change to slow case functions when only one character left.
376         (WebCore::SegmentedString::setAdvanceFunctionPointers): Select appropriate advance
377         functions based on current substring.
378         (WebCore::SegmentedString::lookAheadInline): Changed to use String::startsWith().
379         (WebCore::SegmentedString::lookAheadSlowCase):
380         * xml/parser/CharacterReferenceParserInlineMethods.h:
381         (WebCore::consumeCharacterReference): Changed to use currentChar() instead of
382         SegmentedString '*' operator.
383         * xml/parser/MarkupTokenizerBase.h:
384         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::nextInputCharacter):
385         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::peek): Changed to use
386         currentChar() instead of SegmentedString '*' operator.
387         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::advance):
388
389 2012-07-25  Sheriff Bot  <webkit.review.bot@gmail.com>
390
391         Unreviewed, rolling out r123625 and r123672.
392         http://trac.webkit.org/changeset/123625
393         http://trac.webkit.org/changeset/123672
394         https://bugs.webkit.org/show_bug.cgi?id=92315
395
396         Broke Windows and gcc builds (Requested by rniwa on #webkit).
397
398         * platform/AutodrainedPool.h:
399         (AutodrainedPool):
400         * platform/ContentType.h:
401         (ContentType):
402         * platform/ContextMenu.h:
403         (ContextMenu):
404         * platform/ContextMenuItem.h:
405         (ContextMenuItem):
406         * platform/Cursor.h:
407         (WebCore::SharedCursor::SharedCursor):
408         (Cursor):
409         * platform/KURL.h:
410         (WebCore::KURL::KURL):
411         (KURL):
412         * platform/KURLGooglePrivate.h:
413         (KURLGooglePrivate):
414         * platform/PODRedBlackTree.h:
415         (WebCore::PODRedBlackTree::PODRedBlackTree):
416         * platform/Pasteboard.h:
417         (Pasteboard):
418         * platform/PlatformEvent.h:
419         (WebCore::PlatformEvent::PlatformEvent):
420         * platform/PlatformKeyboardEvent.h:
421         (PlatformKeyboardEvent):
422         * platform/PlatformMouseEvent.h:
423         (PlatformMouseEvent):
424         * platform/PlatformPasteboard.h:
425         (PlatformPasteboard):
426         * platform/PlatformTouchEvent.h:
427         (PlatformTouchEvent):
428         * platform/PlatformWheelEvent.h:
429         (PlatformWheelEvent):
430         * platform/RunLoop.h:
431         (TimerBase):
432         * platform/ScrollAnimator.h:
433         (ScrollAnimator):
434         * platform/ScrollAnimatorNone.h:
435         (ScrollAnimatorNone):
436         * platform/SharedBuffer.h:
437         (SharedBuffer):
438         * platform/WheelFlingPlatformGestureCurve.h:
439         (WheelFlingPlatformGestureCurve):
440         * platform/Widget.h:
441         (Widget):
442         * platform/network/cf/ResourceRequestCFNet.cpp:
443         (WebCore::ResourceRequest::doUpdateResourceRequest):
444
445 2012-07-25  Ryosuke Niwa  <rniwa@webkit.org>
446
447         Windows build fix attempt after r123625.
448
449         * platform/network/cf/ResourceRequestCFNet.cpp:
450         (WebCore::ResourceRequest::doUpdateResourceRequest):
451
452 2012-07-25  Kwang Yul Seo  <skyul@company100.net>
453
454         Read tag names and attributes from the saved tokens in HTMLTreeBuilder::resetInsertionModeAppropriately.
455         https://bugs.webkit.org/show_bug.cgi?id=92240
456
457         Reviewed by Adam Barth.
458
459         This is a follow-up patch for r123577. Added ItemType enum to HTMLStackItem to handle
460         the context element case.
461
462         No new tests, covered by existing tests.
463
464         * html/parser/HTMLStackItem.h:
465         (WebCore::HTMLStackItem::create):
466         (WebCore::HTMLStackItem::HTMLStackItem):
467         * html/parser/HTMLTreeBuilder.cpp:
468         (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
469         (WebCore::HTMLTreeBuilder::resetInsertionModeAppropriately):
470
471 2012-07-25  Nico Weber  <thakis@chromium.org>
472
473         [chromium/mac] Remove mac_bundle_resources section from WebCore.gyp
474         https://bugs.webkit.org/show_bug.cgi?id=92207
475
476         Reviewed by Tony Chang.
477
478         It's no longer needed after http://crrev.com/148290 and
479         http://crrev.com/148187.
480
481         * WebCore.gyp/WebCore.gyp:
482
483 2012-07-25  Dana Jansens  <danakj@chromium.org>
484
485         [chromium] Move WebFilterOperations from RenderPassDrawQuad to RenderPass
486         https://bugs.webkit.org/show_bug.cgi?id=91885
487
488         Reviewed by Adrienne Walker.
489
490         We move the filter operations to CCRenderPass to avoid having
491         variable-length data in a WebCompositorQuad in order to serialize,
492         and also to avoid requiring a virtual destructor for the quad
493         classes.
494
495         The drawFrame method now takes a CCRenderPassIdHashMap in order
496         to connect RenderPass quads to their source RenderPass.
497
498         Covered by existing tests.
499
500         * platform/graphics/chromium/LayerRendererChromium.cpp:
501         (WebCore::LayerRendererChromium::decideRenderPassAllocationsForFrame):
502         (WebCore::LayerRendererChromium::drawFrame):
503         (WebCore::LayerRendererChromium::beginDrawingFrame):
504         (WebCore::LayerRendererChromium::drawBackgroundFilters):
505         (WebCore::LayerRendererChromium::drawRenderPassQuad):
506         * platform/graphics/chromium/LayerRendererChromium.h:
507         (LayerRendererChromium):
508         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
509         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
510         (WebCore::CCLayerTreeHostImpl::drawLayers):
511         * platform/graphics/chromium/cc/CCRenderPass.h:
512         (WebCore::CCRenderPass::filters):
513         (WebCore::CCRenderPass::setFilters):
514         (CCRenderPass):
515         (WebCore::CCRenderPass::backgroundFilters):
516         (WebCore::CCRenderPass::setBackgroundFilters):
517         * platform/graphics/chromium/cc/CCRenderPassDrawQuad.cpp:
518         (WebCore::CCRenderPassDrawQuad::create):
519         (WebCore::CCRenderPassDrawQuad::CCRenderPassDrawQuad):
520         * platform/graphics/chromium/cc/CCRenderPassDrawQuad.h:
521         (CCRenderPassDrawQuad):
522         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
523         (WebCore::CCRenderSurface::appendQuads):
524         * platform/graphics/chromium/cc/CCRenderer.h:
525         (CCRenderer):
526
527 2012-07-25  Mike Reed  <reed@google.com>
528
529         fix test in beginLayerClippedToImage to check for immutability if we're going to do a shallow-copy
530         https://bugs.webkit.org/show_bug.cgi?id=92276
531
532         Reviewed by Stephen White.
533
534         PlatformContextSkia::beginLayerClippedToImage
535
536         This function wants to apply the provided ImageBuffer as a clip. Skia does not support this natively yet,
537         so the code makes a "copy" of that imageBuffer, to be applied later. The old code, wanting to avoid a
538         deep copy if possible, checked for the presence of a SkPixelRef. If it found one, it made a shallow copy.
539         This is flawed, since the contents of a pixelref are not guaranteed to be immutable. The new code checks
540         against this attribute: if the bitmap is "immutable" then we can make a shallow-copy, else we make a
541         deep copy.
542
543         No new tests. Existing svg layouttests work w/ or w/out this change, but at the next Skia deps roll, we see
544         failures w/o this change. The change is more "correct", though the problem case does not exhibit itself until
545         Skia rev. 4722 or later lands.
546
547         * platform/graphics/skia/PlatformContextSkia.cpp:
548         (WebCore::PlatformContextSkia::beginLayerClippedToImage):
549
550 2012-07-25  Li Yin  <li.yin@intel.com>
551
552         It is invalid when both numberOfInputChannels and numberOfOutputChannels to be zero in JavaScriptAudioNode.
553         https://bugs.webkit.org/show_bug.cgi?id=91364
554
555         Reviewed by Kenneth Russell.
556
557         Spec: http://www.w3.org/TR/webaudio/#JavaScriptAudioNode-section
558         It is invalid for both numberOfInputChannels and numberOfOutputChannels to be zero.
559
560         Test: webaudio/javascriptaudionode.html
561
562         * Modules/webaudio/JavaScriptAudioNode.cpp:
563         (WebCore::JavaScriptAudioNode::create):
564
565 2012-07-24  Shawn Singh  <shawnsingh@chromium.org>
566
567         [chromium] Refactor CCLayerTreeHostCommon: move root layer special case initialization into internal code.
568         https://bugs.webkit.org/show_bug.cgi?id=88953
569
570         Reviewed by Adrienne Walker.
571
572         This is part 1 of trying to reduce the root layer special
573         case. This tries to reduce the special-ness of the root layer from
574         the perspective of outside code.
575
576         After this patch, code that uses calcDrawTransforms() no longer
577         needs to initialize the root layer's surface, and no longer needs
578         to manually append the root layer to the renderSurfaceLayerList.
579
580         Unit tests were also updated (much cleaner!) to account for this change.
581
582         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
583         (WebCore::CCLayerTreeHost::updateLayers):
584         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
585         (WebCore):
586         (WebCore::setupRootLayerAndSurfaceForRecursion):
587         (WebCore::CCLayerTreeHostCommon::calculateDrawTransforms):
588         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.h:
589         (CCLayerTreeHostCommon):
590         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
591         (WebCore::CCLayerTreeHostImpl::calculateRenderSurfaceLayerList):
592
593 2012-07-25  Taiju Tsuiki  <tzik@chromium.org>
594
595         FileSystem should provide a way to delete filesystem.
596         https://bugs.webkit.org/show_bug.cgi?id=91861
597
598         Reviewed by Adam Barth.
599
600         We will add a test when we wire-up the feature to Inspector.
601
602         * Modules/filesystem/LocalFileSystem.cpp: Add deleteFileSystem
603         (WebCore::deleteFileSystem):
604         (WebCore):
605         (WebCore::LocalFileSystem::deleteFileSystem):
606         * Modules/filesystem/LocalFileSystem.h:
607         (LocalFileSystem):
608         * platform/AsyncFileSystem.cpp: Add deleteFileSystem
609         (WebCore):
610         (WebCore::AsyncFileSystem::deleteFileSystem):
611         * platform/AsyncFileSystem.h:
612         (AsyncFileSystem):
613         * platform/blackberry/AsyncFileSystemBlackBerry.cpp: Add deleteFileSystem
614         (WebCore::AsyncFileSystem::deleteFileSystem):
615         (WebCore):
616         * platform/gtk/AsyncFileSystemGtk.cpp: Add deleteFileSystem
617         (WebCore::AsyncFileSystem::deleteFileSystem):
618         (WebCore):
619
620 2012-07-25  Andrey Adaikin  <aandrey@chromium.org>
621
622         Web Inspector: Add more jsdocs to InjectedScriptSource.js
623         https://bugs.webkit.org/show_bug.cgi?id=92255
624
625         Reviewed by Pavel Feldman.
626
627         * inspector/InjectedScriptSource.js:
628
629 2012-07-24  Dana Jansens  <danakj@chromium.org>
630
631         [chromium] Turn the debug HUD into a layer so that it can be drawn as a WebCompositorQuad
632         https://bugs.webkit.org/show_bug.cgi?id=92182
633
634         Reviewed by Adrienne Walker.
635
636         By changing the HUD into a quad, we are able to create a HUD and pass
637         it to the host compositor, allowing the HUD to be used for renderers
638         under Ubercompositor.
639
640         This also removes the special drawing code for the HUD from
641         LayerRendererChromium, allowing us to move finishDrawingFrame
642         into LayerRendererChromium as a private method and remove it
643         from the CCRenderer interface.
644
645         Finally, we can remove the CCFontAtlas transport code from CCProxy
646         and its implementations as the atlas can be synced to impl thread
647         through the usual layer commit mechanism.
648
649         The debug HUD is not covered by tests.
650
651         * WebCore.gypi:
652         * platform/graphics/chromium/HeadsUpDisplayLayerChromium.cpp: Added.
653         (WebCore):
654         (WebCore::HeadsUpDisplayLayerChromium::create):
655         (WebCore::HeadsUpDisplayLayerChromium::HeadsUpDisplayLayerChromium):
656         (WebCore::HeadsUpDisplayLayerChromium::~HeadsUpDisplayLayerChromium):
657         (WebCore::HeadsUpDisplayLayerChromium::createCCLayerImpl):
658         * platform/graphics/chromium/HeadsUpDisplayLayerChromium.h: Added.
659         (WebCore):
660         (HeadsUpDisplayLayerChromium):
661         * platform/graphics/chromium/LayerRendererChromium.cpp:
662         (WebCore::LayerRendererChromium::drawFrame):
663         (WebCore::LayerRendererChromium::cleanupSharedObjects):
664         * platform/graphics/chromium/LayerRendererChromium.h:
665         (LayerRendererChromium):
666         * platform/graphics/chromium/cc/CCDebugRectHistory.cpp:
667         (WebCore::CCDebugRectHistory::savePropertyChangedRects):
668         * platform/graphics/chromium/cc/CCDebugRectHistory.h:
669         * platform/graphics/chromium/cc/CCHeadsUpDisplayLayerImpl.cpp: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp.
670         (WebCore):
671         (WebCore::CCHeadsUpDisplayLayerImpl::CCHeadsUpDisplayLayerImpl):
672         (WebCore::CCHeadsUpDisplayLayerImpl::~CCHeadsUpDisplayLayerImpl):
673         (WebCore::CCHeadsUpDisplayLayerImpl::willDraw):
674         (WebCore::CCHeadsUpDisplayLayerImpl::appendQuads):
675         (WebCore::CCHeadsUpDisplayLayerImpl::didDraw):
676         (WebCore::CCHeadsUpDisplayLayerImpl::didLoseContext):
677         (WebCore::CCHeadsUpDisplayLayerImpl::drawHudContents):
678         (WebCore::CCHeadsUpDisplayLayerImpl::drawFPSCounter):
679         (WebCore::CCHeadsUpDisplayLayerImpl::drawFPSCounterText):
680         (WebCore::CCHeadsUpDisplayLayerImpl::drawDebugRects):
681         * platform/graphics/chromium/cc/CCHeadsUpDisplayLayerImpl.h: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCHeadsUpDisplay.h.
682         (WebCore):
683         (CCHeadsUpDisplayLayerImpl):
684         (WebCore::CCHeadsUpDisplayLayerImpl::create):
685         * platform/graphics/chromium/cc/CCLayerImpl.h:
686         (WebCore::CCLayerImpl::layerIsAlwaysDamaged):
687         This flag is used to mark the HUD as always damaged, so that it is
688         continually drawn on the impl thread. It is also used as a hint by
689         the CCDebugRectHistory class to not include the layer in the display
690         of damage, since always damaged is not interesting damage.
691         (CCLayerImpl):
692         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
693         (WebCore::CCLayerTreeHost::create):
694         (WebCore::CCLayerTreeHost::CCLayerTreeHost):
695         (WebCore::CCLayerTreeHost::initialize):
696         (WebCore::CCLayerTreeHost::willCommit):
697         (WebCore::CCLayerTreeHost::didCommit):
698         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
699         (CCLayerTreeSettings):
700         (WebCore::CCLayerTreeSettings::showDebugInfo):
701         (WebCore::CCLayerTreeSettings::showDebugRects):
702         (CCLayerTreeHost):
703         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
704         (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
705         (WebCore::CCLayerTreeHostImpl::drawLayers):
706         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
707         (WebCore):
708         (CCLayerTreeHostImpl):
709         * platform/graphics/chromium/cc/CCProxy.h:
710         (CCProxy):
711         * platform/graphics/chromium/cc/CCRenderer.h:
712         (CCRenderer):
713         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
714         * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
715         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
716         * platform/graphics/chromium/cc/CCThreadProxy.h:
717         (CCThreadProxy):
718
719 2012-07-25  'Pavel Feldman'  <pfeldman@chromium.org>
720
721         Web Inspector: follow up to r123612, fixing CSS value suggest.
722
723         Not reviewed, minor JS fix.
724
725         * inspector/front-end/CSSCompletions.js:
726         (WebInspector.CSSCompletions):
727         * inspector/front-end/StylesSidebarPane.js:
728         (WebInspector.StylePropertyTreeElement.prototype):
729
730 2012-07-25  Michael Saboff  <msaboff@apple.com>
731
732         Unreviewed build fix after r123624.
733
734         * inspector/InspectorPageAgent.cpp:
735         (WebCore::InspectorPageAgent::clearGeolocationOverride):
736         Changed ASSERT_UNUSED() to UNUSED_PARAM().
737
738 2012-07-25  Pavel Feldman  <pfeldman@chromium.org>
739
740         Web inspector auto-completes "optimizequality" but then complains
741         https://bugs.webkit.org/show_bug.cgi?id=92262
742
743         Reviewed by Timothy Hatcher.
744
745         Fixed optimizeSpeed, optimizeLegibility, geometricPrecision.
746
747         * inspector/front-end/CSSKeywordCompletions.js:
748
749 2012-07-25  Beth Dakin  <bdakin@apple.com>
750
751         https://bugs.webkit.org/show_bug.cgi?id=89114
752         REGRESSION (r112919): Setting scrollTop after setting display from none to block 
753         fails
754         -and corresponding-
755         <rdar://problem/11656050>
756
757         Reviewed by Simon Fraser.
758
759         ScrollAnimatorMac::immediateScrollTo() and ScrollAnimatorMac::immediateScrollBy() 
760         both have an optimization in place so that they do not call 
761         notifyPositionChanged() if the new scroll offset matches the ScrollAnimator's 
762         cached m_currentPosX and m_currentPosY. So revision 112919 caused troubled with 
763         this optimization because it allowed RenderLayers to restore a scrollOffset from 
764         the Element if there is one cached there. This caused the RenderLayer to have a 
765         scrollOffset that is improperly out-of-synch with the ScrollAnimator's 
766         currentPosition (which will just be 0,0 since it is being re-created like the 
767         RenderLayer). This fix makes sure they are in synch by calling 
768         setCurrentPosition() on the ScrollAnimator when the cached position is non-zero.
769         * rendering/RenderLayer.cpp:
770         (WebCore::RenderLayer::RenderLayer):
771
772 2012-07-25  Andreas Kling  <kling@webkit.org>
773
774         Make ElementAttributeData a variable-sized object to reduce memory use.
775         <http://webkit.org/b/88240>
776
777         Reviewed by Ryosuke Niwa.
778
779         Take advantage of the fact that we know at ElementAttributeData construction time how many attributes
780         it needs to accomodate and allocate exactly as much space as needed instead of using a Vector.
781         For elements that never have their attribute list mutated (the vast majority), this saves a lot of
782         memory and removes the indirection to Vector<Attribute>'s heap-allocated storage.
783
784         Introduced a mutability flag to ElementAttributeData and sprinkled assertions all over to make sure
785         that nothing tries to mutate an element with a raw attribute array.
786
787         When an Element's attribute(s) are mutated, we reconstruct the ElementAttributeData, this time using
788         a Vector as backing instead. This is triggered when calling Element::mutableAttributeData().
789
790         This reduces memory consumption by 3.2MB when viewing the full HTML5 spec at <http://whatwg.org/c/>.
791         That is a ~35% reduction in DOM attribute memory use.
792
793         Furthermore, that page ends up promoting 27% of the elements to mutable attribute storage due to dynamic
794         adding of "class" attributes. For more static pages, savings are even greater.
795
796         Also did away with ElementAttributeData::removeAttribute(name) and do separate index lookup where
797         needed. Not a big deal but avoids double lookup of attributes when removing them.
798
799         * dom/Element.cpp:
800         (WebCore::Element::detachAttribute):
801         (WebCore::Element::removeAttribute):
802         (WebCore::Element::attributes):
803         (WebCore::Element::setAttributeInternal):
804         (WebCore::Element::parserSetAttributes):
805         (WebCore::Element::hasEquivalentAttributes):
806         (WebCore::Element::setAttributeNode):
807         (WebCore::Element::removeAttributeNode):
808         (WebCore::Element::getAttributeNode):
809         (WebCore::Element::getAttributeNodeNS):
810         (WebCore::Element::hasAttribute):
811         (WebCore::Element::hasAttributeNS):
812         (WebCore::Element::cloneAttributesFromElement):
813
814             Sprinkle const on ElementAttributeData* pointers.
815             Switch to using mutableAttributeData() in code paths that modify attributes.
816
817         (WebCore::Element::normalizeAttributes):
818
819             Cleaner iteration over attributes, I removed ElementAttributeData::attributeVector() since that
820             was just incurring a bunch of extra Vector copying. Since ElementAttributeData already exposes
821             length() and attributeItem(index), use those to iterate directly over the attributes.
822
823         (WebCore::Element::createMutableAttributeData):
824
825             Added, converts existing ElementAttributeData to a mutable object. Otherwise creates a new
826             ElementAttributeData (mutable and empty.)
827
828         * dom/Element.h:
829         (WebCore::Element::attributeData):
830         (WebCore::Element::updatedAttributeData):
831         (WebCore::Element::ensureAttributeData):
832         (WebCore::Element::ensureUpdatedAttributeData):
833
834             Made all of these return "const ElementAttributeData*" to ensure at compile-time that nothing
835             attempts to modify an ElementAttributeData that may be immutable.
836
837             ensureUpdatedAttributeData() is still const, despite possibly calling mutableAttributeData().
838             The goal of having methods be const is to prevent conversion from one ElementAttributeData
839             object to another, so that pointers remain intact and no unnecessary work gets done.
840
841         (WebCore::Element::mutableAttributeData):
842
843             Added, returns a guaranteed mutable ElementAttributeData* pointer.
844
845         * dom/ElementAttributeData.cpp:
846         (WebCore::ElementAttributeData::createImmutable):
847
848             Creates a new ElementAttributeData tailored to fit the provided Vector<Attribute>.
849
850         (WebCore::ElementAttributeData::ElementAttributeData):
851
852             Moved constructors out-of-line, getting too complex for header files.
853
854             ElementAttributeData(const Vector<Attribute>&) creates an immutable ElementAttributeData
855             containing the provided attributes in an array tacked onto the end of the object.
856
857         (WebCore::ElementAttributeData::~ElementAttributeData):
858
859             Free the attribute vector if mutable.
860             For immutable objects, manually invoke destructor on each Attribute object,
861             since these won't be destroyed automatically by ~ElementAttributeData.
862
863         (WebCore::ElementAttributeData::attrIfExists):
864
865         (WebCore::ElementAttributeData::ensureAttr):
866         (WebCore::ElementAttributeData::setAttr):
867         (WebCore::ElementAttributeData::removeAttr):
868
869             Make these const, as they should always have been- they don't affect the ElementAttributeData,
870             only the global DOM Attr <-> ElementAttributeData mappings.
871
872         (WebCore::ElementAttributeData::ensureInlineStyle):
873         (WebCore::ElementAttributeData::ensureMutableInlineStyle):
874
875             Sprinkle ASSERT(isMutable()). This doesn't mean that all Elements with inline styles automatically
876             have mutable attribute data. There's still inlineStyle() for that, which may return null.
877             These are only for use where you need a valid StylePropertySet*, even if there is no inline style
878             attribute, e.g in editing code that wants to add style.
879
880         (WebCore::ElementAttributeData::updateInlineStyleAvoidingMutation):
881         (WebCore::ElementAttributeData::destroyInlineStyle):
882
883             Make these const. While destroyInlineStyle() doesn't sound very const-y, immutable objects that
884             contain a style attribute will have a valid inlineStyle() with that style data. This is just
885             an interface for ~StyledElement to destroy the style object.
886             It'd be nice to do that in ~ElementAttributeData(), but we need a StyledElement* pointer to
887             clean up properly and we don't store one in this class.
888
889         (WebCore::ElementAttributeData::addAttribute):
890         (WebCore::ElementAttributeData::removeAttribute):
891         (WebCore::ElementAttributeData::clearAttributes):
892         (WebCore::ElementAttributeData::replaceAttribute):
893
894             Sprinkle ASSERT(isMutable()).
895             Always go straight for m_mutableAttributeVector since we know that's the storage being used.
896
897         (WebCore::ElementAttributeData::isEquivalent):
898         (WebCore::ElementAttributeData::detachAttrObjectsFromElement):
899         (WebCore::ElementAttributeData::getAttributeItemIndexSlowCase):
900         (WebCore::ElementAttributeData::removeAttribute):
901         (WebCore::ElementAttributeData::getAttributeItem):
902         (WebCore::ElementAttributeData::getAttributeItemIndex):
903
904             Use length() and attributeItem(index) to iterate over the attributes.
905
906         (WebCore::ElementAttributeData::cloneDataFrom):
907
908             Sprinkle ASSERT(isMutable()). Added a FIXME that cloning elements could create immutable
909             attribute data. I'm not sure this optimization is worthwhile, as cloning elements is already
910             a semi-rare occurrence.
911
912             Updated code to handle both immutable and mutable source objects. This could 
913
914         (WebCore::ElementAttributeData::getAttributeNode):
915
916             Const correctness.
917
918         * dom/ElementAttributeData.h:
919         (ElementAttributeData):
920
921             Turn attribute storage into what's effectively union { OwnPtr<Vector<Attribute>>; Attribute[]; }
922             The new m_isMutable bit determines which union member should be used for access.
923
924         (WebCore::ElementAttributeData::create):
925         (WebCore::ElementAttributeData::createImmutable):
926
927             Added createImmutable(const Vector<Attribute>&) as a complement to create().
928
929         (WebCore::ElementAttributeData::setClass):
930         (WebCore::ElementAttributeData::setIdForStyleResolution):
931         (WebCore::ElementAttributeData::inlineStyle):
932         (WebCore::ElementAttributeData::setAttributeStyle):
933
934             Make these const, and their data member counterparts 'mutable'.
935             An immutable ElementAttributeData object still has m_classNames, m_idForStyleResolution,
936             m_inlineStyleDecl and m_attributeStyle.
937
938         (WebCore::ElementAttributeData::reportMemoryUsage):
939
940             Updated for isMutable().
941
942         (WebCore::ElementAttributeData::makeMutable):
943
944             Returns a mutable clone of itself.
945
946         (WebCore::ElementAttributeData::isEmpty):
947         (WebCore::ElementAttributeData::length):
948         (WebCore::ElementAttributeData::attributeItem):
949
950             Check isMutable() to know how to access attribute storage.
951
952         * dom/StyledElement.cpp:
953         (WebCore::StyledElement::style):
954         (WebCore::StyledElement::setInlineStyleProperty):
955
956             Simplify by using StyledElement::ensureInlineStyle().
957
958         (WebCore::StyledElement::classAttributeChanged):
959
960             Use mutableAttributeData() if the attribute is being removed completely.
961             In other cases, tiptoe around without causing the attribute data to go mutable.
962
963         (WebCore::StyledElement::removeInlineStyleProperty):
964
965             Use mutableAttributeData() if/when actually removing something.
966
967         (WebCore::StyledElement::addSubresourceAttributeURLs):
968
969             Const correctness.
970
971         * dom/StyledElement.h:
972         (WebCore::StyledElement::ensureInlineStyle):
973
974             This now implies conversion to mutable attribute data. Used by codepaths that add/remove
975             properties, so conversion is inevitable.
976
977         * html/parser/HTMLConstructionSite.cpp:
978         (WebCore::HTMLConstructionSite::mergeAttributesFromTokenIntoElement):
979         (WebCore::HTMLConstructionSite::createHTMLElementFromSavedElement):
980         * svg/properties/SVGAnimatedPropertyMacros.h:
981         (WebCore::SVGSynchronizableAnimatedProperty::synchronize):
982
983             Use mutableAttributeData() as appropriate.
984
985         * xml/parser/XMLDocumentParserQt.cpp:
986         (WebCore::XMLDocumentParser::XMLDocumentParser):
987
988             Const correctness.
989
990 2012-07-25  Andrew Wilson  <atwilson@chromium.org>
991
992         Unreviewed, rolling out r123560.
993         http://trac.webkit.org/changeset/123560
994         https://bugs.webkit.org/show_bug.cgi?id=90321
995
996         Breaks chromium valgrind tests.
997
998         * html/FTPDirectoryDocument.cpp:
999         (WebCore::FTPDirectoryDocumentParser::append):
1000         * html/parser/HTMLEntityParser.cpp:
1001         (WebCore::HTMLEntityParser::consumeNamedEntity):
1002         * html/parser/HTMLParserIdioms.cpp:
1003         (WebCore::stripLeadingAndTrailingHTMLSpaces):
1004         * html/parser/HTMLSourceTracker.cpp:
1005         (WebCore::HTMLSourceTracker::sourceForToken):
1006         * loader/cache/CachedScript.cpp:
1007         (WebCore::CachedScript::script):
1008         * platform/text/SegmentedString.cpp:
1009         (WebCore::SegmentedString::SegmentedString):
1010         (WebCore::SegmentedString::operator=):
1011         (WebCore::SegmentedString::clear):
1012         (WebCore::SegmentedString::append):
1013         (WebCore::SegmentedString::prepend):
1014         (WebCore::SegmentedString::advanceSubstring):
1015         (WebCore::SegmentedString::advance):
1016         (WebCore::SegmentedString::advanceSlowCase):
1017         (WebCore::SegmentedString::advanceAndUpdateLineNumberSlowCase):
1018         * platform/text/SegmentedString.h:
1019         (WebCore::SegmentedSubstring::SegmentedSubstring):
1020         (WebCore::SegmentedSubstring::clear):
1021         (WebCore::SegmentedSubstring::appendTo):
1022         (SegmentedSubstring):
1023         (WebCore::SegmentedString::SegmentedString):
1024         (WebCore::SegmentedString::push):
1025         (WebCore::SegmentedString::isEmpty):
1026         (WebCore::SegmentedString::lookAhead):
1027         (WebCore::SegmentedString::lookAheadIgnoringCase):
1028         (WebCore::SegmentedString::advance):
1029         (WebCore::SegmentedString::advanceAndASSERT):
1030         (WebCore::SegmentedString::advanceAndASSERTIgnoringCase):
1031         (WebCore::SegmentedString::advancePastNewlineAndUpdateLineNumber):
1032         (SegmentedString):
1033         (WebCore::SegmentedString::advancePastNonNewline):
1034         (WebCore::SegmentedString::advanceAndUpdateLineNumber):
1035         (WebCore::SegmentedString::operator*):
1036         (WebCore::SegmentedString::operator->):
1037         (WebCore::SegmentedString::current):
1038         (WebCore::SegmentedString::equalsLiterally):
1039         (WebCore::SegmentedString::equalsIgnoringCase):
1040         (WebCore::SegmentedString::lookAheadInline):
1041         (WebCore::SegmentedString::lookAheadSlowCase):
1042         * xml/parser/CharacterReferenceParserInlineMethods.h:
1043         (WebCore::consumeCharacterReference):
1044         * xml/parser/MarkupTokenizerBase.h:
1045         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::nextInputCharacter):
1046         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::peek):
1047         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::advance):
1048
1049 2012-07-25  Konrad Piascik  <kpiascik@rim.com>
1050
1051         Web Inspector: Geolocation override
1052         https://bugs.webkit.org/show_bug.cgi?id=89365
1053
1054         Reviewed by Pavel Feldman.
1055
1056         Re-added the m_page member variable for GeolocationController since
1057         it's now being used by InspectorInstrumentaiton.
1058
1059         Added a way to override the GeolocationPosition and GeolocationError
1060         using Web Inspector. Curretnly only PositionError can be set.
1061
1062         This will be hidden behind the experiments flag for now.
1063
1064         Tests: inspector/geolocation-error.html
1065                inspector/geolocation-success.html
1066                inspector/geolocation-watchPosition.html
1067
1068         * English.lproj/localizedStrings.js:
1069         * Modules/geolocation/GeolocationController.cpp:
1070         (WebCore::GeolocationController::GeolocationController):
1071         (WebCore::GeolocationController::positionChanged):
1072         * Modules/geolocation/GeolocationController.h:
1073         (GeolocationController):
1074         * inspector/Inspector.json:
1075         * inspector/InspectorInstrumentation.cpp:
1076         (WebCore):
1077         (WebCore::InspectorInstrumentation::overrideGeolocationPositionImpl):
1078         * inspector/InspectorInstrumentation.h:
1079         (WebCore):
1080         (InspectorInstrumentation):
1081         (WebCore::InspectorInstrumentation::overrideGeolocationPosition):
1082         * inspector/InspectorPageAgent.cpp:
1083         (WebCore::InspectorPageAgent::InspectorPageAgent):
1084         (WebCore::InspectorPageAgent::setGeolocationOverride):
1085         (WebCore):
1086         (WebCore::InspectorPageAgent::clearGeolocationOverride):
1087         (WebCore::InspectorPageAgent::canOverrideGeolocation):
1088         (WebCore::InspectorPageAgent::overrideGeolocationPosition):
1089         * inspector/InspectorPageAgent.h:
1090         * inspector/front-end/Settings.js:
1091         * inspector/front-end/SettingsScreen.js:
1092         (WebInspector.UserAgentSettingsTab):
1093         (WebInspector.UserAgentSettingsTab.prototype._createDeviceMetricsElement):
1094         (WebInspector.UserAgentSettingsTab.prototype._onGeolocationOverrideCheckboxClicked):
1095         (WebInspector.UserAgentSettingsTab.prototype._applyGeolocationUserInput):
1096         (WebInspector.UserAgentSettingsTab.prototype._setGeolocationPosition.set if):
1097         (WebInspector.UserAgentSettingsTab.prototype._setGeolocationPosition):
1098         (WebInspector.UserAgentSettingsTab.prototype._createGeolocationOverrideElement.createInput):
1099         (WebInspector.UserAgentSettingsTab.prototype._createGeolocationOverrideElement):
1100         * inspector/front-end/UserAgentSupport.js:
1101         (WebInspector.UserAgentSupport.GeolocationPosition):
1102         (WebInspector.UserAgentSupport.GeolocationPosition.prototype.toSetting):
1103         (WebInspector.UserAgentSupport.GeolocationPosition.parseSetting):
1104         (WebInspector.UserAgentSupport.GeolocationPosition.parseUserInput):
1105         (WebInspector.UserAgentSupport.GeolocationPosition.clearGeolocationOverride):
1106         * inspector/front-end/inspector.js:
1107         (WebInspector.doLoadedDone):
1108
1109 2012-07-25  Shawn Singh  <shawnsingh@chromium.org>
1110
1111         [chromium] Build fix for clang builds after r123628
1112         https://bugs.webkit.org/show_bug.cgi?id=92266
1113
1114         Reviewed by Adrienne Walker.
1115
1116         An un-used variable was causing build failures for clang builds
1117         after the refactoring in r123628.  It is correct to simply remove
1118         this value.
1119
1120         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
1121         (WebCore::calculateDrawTransformsInternal):
1122
1123 2012-07-25  Hans Wennborg  <hans@chromium.org>
1124
1125         Speech JavaScript API: extract function from SpeechRecognitionResult::emma()
1126         https://bugs.webkit.org/show_bug.cgi?id=92232
1127
1128         Reviewed by Adam Barth.
1129
1130         Extract code for creating emma-qualified names to a helper function.
1131
1132         Just a refactoring; covered by the existing test.
1133
1134         * Modules/speech/SpeechRecognitionResult.cpp:
1135         (WebCore::emmaQualifiedName):
1136         (WebCore):
1137         (WebCore::SpeechRecognitionResult::emma):
1138
1139 2012-07-25  Adrienne Walker  <enne@google.com>
1140
1141         [chromium] Unify compositor quadTransform/drawTransform/originTransform
1142         https://bugs.webkit.org/show_bug.cgi?id=91417
1143
1144         Reviewed by Kenneth Russell.
1145
1146         drawTransform used to operate on centered layer rects. To unify quad
1147         transforms, draw transforms, and origin transforms, make draw
1148         transforms operate on content rects with the origin in the top left.
1149
1150         This essentially eliminates the need for surface origin transforms,
1151         which will be eliminated in a future patch.
1152
1153         Also, remove the unused CCLayerImpl::getDrawRect function.
1154
1155         No-op refactoring. Tested by existing tests.
1156
1157         * platform/graphics/chromium/LayerRendererChromium.cpp:
1158         (WebCore::LayerRendererChromium::drawRenderPassQuad):
1159         * platform/graphics/chromium/RenderSurfaceChromium.cpp:
1160         (WebCore::RenderSurfaceChromium::drawableContentRect):
1161         * platform/graphics/chromium/cc/CCDamageTracker.cpp:
1162         (WebCore::CCDamageTracker::extendDamageForLayer):
1163         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
1164         (WebCore::CCLayerImpl::createSharedQuadState):
1165         * platform/graphics/chromium/cc/CCLayerImpl.h:
1166         (CCLayerImpl):
1167         * platform/graphics/chromium/cc/CCLayerSorter.cpp:
1168         (WebCore::CCLayerSorter::LayerShape::LayerShape):
1169         (WebCore::CCLayerSorter::createGraphNodes):
1170         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
1171         (WebCore::calculateVisibleContentRect):
1172         (WebCore::calculateDrawTransformsInternal):
1173         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
1174         (WebCore::::markOccludedBehindLayer):
1175         (WebCore::::occluded):
1176         (WebCore::::unoccludedContentRect):
1177         * platform/graphics/chromium/cc/CCRenderPass.cpp:
1178         (WebCore::CCRenderPass::appendQuadsToFillScreen):
1179         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
1180         (WebCore::CCRenderSurface::drawableContentRect):
1181
1182 2012-07-25  Tommy Widenflycht  <tommyw@google.com>
1183
1184         MediaStream API: Update MediaStreamTrack to match the specification
1185         https://bugs.webkit.org/show_bug.cgi?id=90180
1186
1187         Reviewed by Adam Barth.
1188
1189         MediaStreamTracks are now required to show the status of the underlying source,
1190         and trigger events when that status changes.
1191
1192         Test: fast/mediastream/MediaStreamTrack.html
1193
1194         * GNUmakefile.list.am:
1195         * Modules/mediastream/MediaStream.cpp:
1196         (WebCore::MediaStream::MediaStream):
1197         (WebCore::MediaStream::addTrack):
1198         * Modules/mediastream/MediaStreamTrack.cpp:
1199         (WebCore::MediaStreamTrack::create):
1200         (WebCore::MediaStreamTrack::MediaStreamTrack):
1201         (WebCore::MediaStreamTrack::~MediaStreamTrack):
1202         (WebCore::MediaStreamTrack::setEnabled):
1203         (WebCore::MediaStreamTrack::readyState):
1204         (WebCore):
1205         (WebCore::MediaStreamTrack::sourceChangedState):
1206         (WebCore::MediaStreamTrack::stop):
1207         (WebCore::MediaStreamTrack::interfaceName):
1208         (WebCore::MediaStreamTrack::scriptExecutionContext):
1209         (WebCore::MediaStreamTrack::eventTargetData):
1210         (WebCore::MediaStreamTrack::ensureEventTargetData):
1211         * Modules/mediastream/MediaStreamTrack.h:
1212         * Modules/mediastream/MediaStreamTrack.idl:
1213         * WebCore.gypi:
1214         * dom/EventNames.h:
1215         (WebCore):
1216         * dom/EventTargetFactory.in:
1217         * platform/chromium/support/WebMediaStreamDescriptor.cpp:
1218         * platform/chromium/support/WebMediaStreamSource.cpp:
1219         (WebKit::WebMediaStreamSource::setReadyState):
1220         (WebKit):
1221         (WebKit::WebMediaStreamSource::readyState):
1222         * platform/mediastream/MediaStreamSource.cpp: Copied from Source/WebCore/platform/mediastream/MediaStreamSource.h.
1223         (WebCore):
1224         (WebCore::MediaStreamSource::create):
1225         (WebCore::MediaStreamSource::MediaStreamSource):
1226         (WebCore::MediaStreamSource::setReadyState):
1227         (WebCore::MediaStreamSource::addObserver):
1228         (WebCore::MediaStreamSource::removeObserver):
1229         * platform/mediastream/MediaStreamSource.h:
1230         (Observer):
1231         (WebCore::MediaStreamSource::Observer::~Observer):
1232         (MediaStreamSource):
1233         (WebCore::MediaStreamSource::readyState):
1234         * platform/mediastream/chromium/MediaStreamCenterChromium.cpp:
1235         (WebCore::MediaStreamCenterChromium::queryMediaStreamSources):
1236         (WebCore::MediaStreamCenterChromium::didCreateMediaStream):
1237
1238 2012-07-25  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
1239
1240         Incorrect rounding in ceiledLayoutUnit and roundedLayoutUnit.
1241         https://bugs.webkit.org/show_bug.cgi?id=91061
1242
1243         Reviewed by Adam Barth.
1244
1245         The two functions are currently both returning the flooredLayoutUnit when subpixel
1246         layout is enabled. This patch changes them to return the correct fractional rounded
1247         value.
1248
1249         * platform/FractionalLayoutUnit.h:
1250         (WebCore::FractionalLayoutUnit::fromFloatCeil):
1251         (FractionalLayoutUnit):
1252         (WebCore::FractionalLayoutUnit::fromFloatRound):
1253         * rendering/LayoutTypes.h:
1254         (WebCore::roundedLayoutUnit):
1255         (WebCore::ceiledLayoutUnit):
1256         * rendering/RenderBlock.cpp:
1257         (WebCore::updatePreferredWidth):
1258
1259 2012-07-25  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1260
1261         Add *explicit* keyword to constructors in WebCore/platform
1262         https://bugs.webkit.org/show_bug.cgi?id=92238
1263
1264         Reviewed by Kentaro Hara.
1265
1266         As a step to let *explicit* keyword add to constructors which have a parameter,
1267         *explicit* keyword is added to Source/WebCore/platform in order to avoid implicit
1268         type conversion.
1269
1270         Some files in platform directory can't use explicit keyword because of build breaks.
1271
1272         No new tests. Covered by existing tests.
1273
1274         * platform/AutodrainedPool.h:
1275         (AutodrainedPool):
1276         * platform/ContentType.h:
1277         (ContentType):
1278         * platform/ContextMenu.h:
1279         (ContextMenu):
1280         * platform/ContextMenuItem.h:
1281         (ContextMenuItem):
1282         * platform/Cursor.h:
1283         (WebCore::SharedCursor::SharedCursor):
1284         (Cursor):
1285         * platform/KURL.h:
1286         (WebCore::KURL::KURL):
1287         (KURL):
1288         * platform/KURLGooglePrivate.h:
1289         (KURLGooglePrivate):
1290         * platform/PODRedBlackTree.h:
1291         (WebCore::PODRedBlackTree::PODRedBlackTree):
1292         * platform/Pasteboard.h:
1293         (Pasteboard):
1294         * platform/PlatformEvent.h:
1295         (WebCore::PlatformEvent::PlatformEvent):
1296         * platform/PlatformKeyboardEvent.h:
1297         (PlatformKeyboardEvent):
1298         * platform/PlatformMouseEvent.h:
1299         (PlatformMouseEvent):
1300         * platform/PlatformPasteboard.h:
1301         (PlatformPasteboard):
1302         * platform/PlatformTouchEvent.h:
1303         (PlatformTouchEvent):
1304         * platform/PlatformWheelEvent.h:
1305         (PlatformWheelEvent):
1306         * platform/RunLoop.h:
1307         (TimerBase):
1308         * platform/ScrollAnimator.h:
1309         (ScrollAnimator):
1310         * platform/ScrollAnimatorNone.h:
1311         (ScrollAnimatorNone):
1312         * platform/SharedBuffer.h:
1313         (SharedBuffer):
1314         * platform/WheelFlingPlatformGestureCurve.h:
1315         (WheelFlingPlatformGestureCurve):
1316         * platform/Widget.h:
1317         (Widget):
1318
1319 2012-07-25  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
1320
1321         NodesFromRect and area-based hit-testing can not handle CSS transforms.
1322         https://bugs.webkit.org/show_bug.cgi?id=85792
1323
1324         Reviewed by Eric Seidel.
1325
1326         To support the combination of CSS transforms and rect based hit testing,
1327         we need to test against the transformed rect, instead of the original rect.
1328
1329         This patch makes HitTestPoint store the exact transformed FloatPoint and 
1330         FloatQuad, and modifies the intersection methods so that they will use a 
1331         new FloatQuad based intersection when transforms requires it.
1332
1333         Tests: fast/dom/nodesFromRect/nodesFromRect-rotate.html
1334                fast/dom/nodesFromRect/nodesFromRect-scale.html
1335
1336         * platform/graphics/FloatQuad.cpp:
1337         (WebCore::determinant):
1338         (WebCore::rightMostCornerToVector):
1339         (WebCore::FloatQuad::intersectsRect):
1340         (WebCore::FloatQuad::isCounterclockwise):
1341         * platform/graphics/FloatQuad.h:
1342         (FloatQuad):
1343         * rendering/HitTestResult.cpp:
1344         (WebCore::HitTestPoint::HitTestPoint):
1345         (WebCore::HitTestPoint::operator=):
1346         (WebCore::HitTestPoint::move):
1347         (WebCore::HitTestPoint::intersectsRect):
1348         (WebCore::HitTestPoint::intersects):
1349         * rendering/HitTestResult.h:
1350         (HitTestPoint):
1351         (WebCore::HitTestPoint::isRectilinear):
1352         (WebCore::HitTestPoint::transformedPoint):
1353         (WebCore::HitTestPoint::transformedRect):
1354         * rendering/HitTestingTransformState.cpp:
1355         (WebCore::HitTestingTransformState::flattenWithTransform):
1356         (WebCore::HitTestingTransformState::mappedArea):
1357         (WebCore::HitTestingTransformState::boundsOfMappedArea):
1358         * rendering/HitTestingTransformState.h:
1359         (WebCore::HitTestingTransformState::create):
1360         (WebCore::HitTestingTransformState::HitTestingTransformState):
1361         * rendering/RenderFlowThread.cpp:
1362         (WebCore::RenderFlowThread::hitTestRegion):
1363         * rendering/RenderLayer.cpp:
1364         (WebCore::RenderLayer::hitTest):
1365         (WebCore::RenderLayer::createLocalTransformState):
1366         (WebCore::RenderLayer::hitTestLayer):
1367         (WebCore::RenderLayer::hitTestChildLayerColumns):
1368         * rendering/RenderLayer.h:
1369         * rendering/svg/RenderSVGText.cpp:
1370         (WebCore::RenderSVGText::nodeAtFloatPoint):
1371
1372 2012-07-25  Kwang Yul Seo  <skyul@company100.net>
1373
1374         Add HTMLStackItem.h to project files
1375         https://bugs.webkit.org/show_bug.cgi?id=92221
1376
1377         Reviewed by Adam Barth.
1378
1379         Added HTMLStackItem.h introduced in r123399 to project files.
1380
1381         Project file changes only, no change in behavior thus no new tests.
1382
1383         * GNUmakefile.list.am:
1384         * WebCore.gypi:
1385         * WebCore.vcproj/WebCore.vcproj:
1386         * WebCore.xcodeproj/project.pbxproj:
1387
1388 2012-07-25  Sheriff Bot  <webkit.review.bot@gmail.com>
1389
1390         Unreviewed, rolling out r123606.
1391         http://trac.webkit.org/changeset/123606
1392         https://bugs.webkit.org/show_bug.cgi?id=92247
1393
1394         broke Windows build of Chromium (Requested by tomhudson on
1395         #webkit).
1396
1397         * Resources/colorSuggestionPicker.css: Removed.
1398         * Resources/colorSuggestionPicker.js: Removed.
1399         * WebCore.gyp/WebCore.gyp:
1400
1401 2012-07-25  Pavel Feldman  <pfeldman@chromium.org>
1402
1403         Web Inspector: disabling property should remove "overriden" decoration from overriden UA shorthand.
1404         https://bugs.webkit.org/show_bug.cgi?id=92253
1405
1406         Reviewed by Vsevolod Vlasov.
1407
1408         Bug fix with a test and more compilation markup.
1409
1410         Test: inspector/styles/styles-disable-then-enable-overriden-ua.html
1411
1412         * inspector/front-end/StylesSidebarPane.js:
1413         (WebInspector.StylePropertiesSection.prototype.update):
1414         (WebInspector.StylePropertyTreeElement):
1415         (WebInspector.StylePropertyTreeElement.prototype):
1416
1417 2012-07-25  Vsevolod Vlasov  <vsevik@chromium.org>
1418
1419         Web Inspector: Improve ObjectPropertiesSection UI by adding a tooltip for the value.
1420         https://bugs.webkit.org/show_bug.cgi?id=92225
1421
1422         Reviewed by Pavel Feldman.
1423
1424         Added tooltip with property value description on the property's valueElement.
1425
1426         * inspector/front-end/ObjectPropertiesSection.js:
1427         (WebInspector.ObjectPropertyTreeElement.prototype.update):
1428
1429 2012-07-25  Pavel Feldman  <pfeldman@chromium.org>
1430
1431         https://bugs.webkit.org/show_bug.cgi?id=91931
1432
1433         Reviewed by Vsevolod Vlasov.
1434
1435         - Synthetic shorthand values are now only returned for source-less styles
1436         - CSSAgents reports longhands along with the property names in getSupportedCSSProperties
1437         - StylesSidebarPane now has two paths: for source-enabled styles and for CSSOM-based ones (UA styles)
1438         - CSSStyleModel uses style metainfo as a source of shorthand / longhand relationship now
1439
1440         Test: inspector/styles/styles-overriden-properties.html
1441
1442         * inspector/Inspector.json:
1443         * inspector/InspectorCSSAgent.cpp:
1444         (WebCore::InspectorCSSAgent::getSupportedCSSProperties):
1445         * inspector/InspectorCSSAgent.h:
1446         (InspectorCSSAgent):
1447         * inspector/InspectorStyleSheet.cpp:
1448         (WebCore::InspectorStyle::styleWithProperties):
1449         * inspector/front-end/CSSCompletions.js:
1450         (WebInspector.CSSCompletions):
1451         (WebInspector.CSSCompletions.requestCSSNameCompletions):
1452         (WebInspector.CSSCompletions.prototype._closest):
1453         (WebInspector.CSSCompletions.prototype.longhands):
1454         (WebInspector.CSSCompletions.prototype.shorthands):
1455         * inspector/front-end/CSSStyleModel.js:
1456         (WebInspector.CSSStyleDeclaration):
1457         (WebInspector.CSSStyleDeclaration.prototype.longhandProperties):
1458         (WebInspector.CSSStyleDeclaration.prototype.shorthandValue):
1459         (WebInspector.CSSStyleDeclaration.prototype.newBlankProperty):
1460         (WebInspector.CSSProperty):
1461         (WebInspector.CSSProperty.parsePayload):
1462         * inspector/front-end/SourceCSSTokenizer.js:
1463         (WebInspector.SourceCSSTokenizer):
1464         * inspector/front-end/SourceCSSTokenizer.re2js:
1465         * inspector/front-end/StylesSidebarPane.js:
1466         (WebInspector.StylePropertiesSection.prototype.isPropertyOverloaded):
1467         (WebInspector.StylePropertiesSection.prototype.update):
1468         (WebInspector.StylePropertiesSection.prototype.onpopulate):
1469         (WebInspector.StylePropertyTreeElement.prototype):
1470
1471 2012-07-25  Keishi Hattori  <keishi@webkit.org>
1472
1473         Implement ColorSuggestionPicker page popup
1474         https://bugs.webkit.org/show_bug.cgi?id=92109
1475
1476         Reviewed by Kent Tamura.
1477
1478         Implements ColorSuggestionPicker page popup. This will be used in
1479         certain ports as the datalist UI for <input type=color>.
1480
1481         No new tests because there is no way to open the popup yet.
1482
1483         * Resources/colorSuggestionPicker.css: Added.
1484         (body):
1485         (#main):
1486         (.color-swatch):
1487         (.color-swatch:hover):
1488         (.color-swatch-container):
1489         (.other-color):
1490         * Resources/colorSuggestionPicker.js: Added.
1491         (getScrollbarWidth):When there are more than 20 colors we need to
1492         increase the window width to accommodate the scroll bar.
1493         (createElement):
1494         (handleMessage):
1495         (initialize):
1496         (handleArgumentsTimeout):
1497         (validateArguments):
1498         (submitValue): Calls setValueAndClosePopup with a numValue of 0.
1499         (handleCancel): Calls setValueAndClosePopup with a numValue of -1.
1500         (chooseOtherColor): Calls setValueAndClosePopup with a numValue of -2.
1501         (ColorPicker):
1502         (ColorPicker.prototype._layout): Lays out the color swatches in a 5x4
1503         grid.
1504         (ColorPicker.prototype._handleSwatchClick):
1505         * WebCore.gyp/WebCore.gyp:
1506
1507 2012-07-25  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
1508
1509         Fix arithmetic composite filter for auto-vectorization
1510         https://bugs.webkit.org/show_bug.cgi?id=92123
1511
1512         Reviewed by Nikolas Zimmermann.
1513
1514         Since only clamping of the result prevents GCC from auto-vectorizing the inner loop, this patch 
1515         adds a faster version of the inner loop to handle cases where clamping is unnecessary, 
1516
1517         * platform/graphics/filters/FEComposite.cpp:
1518         (WebCore::computeArithmeticPixelsUnclamped):
1519         (WebCore::arithmeticSoftware):
1520
1521 2012-07-25  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
1522
1523         Fix blend filter for autovectorizing
1524         https://bugs.webkit.org/show_bug.cgi?id=91398
1525
1526         Reviewed by Nikolas Zimmermann.
1527
1528         Get rid of wrapper classes, and use functions directly as template argument.
1529
1530         * platform/graphics/filters/FEBlend.cpp:
1531         (WebCore::feBlendNormal):
1532         (WebCore::feBlendMultiply):
1533         (WebCore::feBlendScreen):
1534         (WebCore::feBlendDarken):
1535         (WebCore::feBlendLighten):
1536         (WebCore::feBlendUnknown):
1537         (WebCore::platformApply):
1538         (WebCore::FEBlend::platformApplyGeneric):
1539
1540 2012-07-25  Keishi Hattori  <keishi@webkit.org>
1541
1542         Add methods to ColorChooserClient so the color chooser can show suggestions
1543         https://bugs.webkit.org/show_bug.cgi?id=92114
1544
1545         Reviewed by Kent Tamura.
1546
1547         Added methods to ColorChooserClient so the color chooser can ask the
1548         client for suggestions and current color.
1549
1550         No new tests. The methods are not used yet.
1551
1552         * html/ColorInputType.cpp:
1553         (WebCore::ColorInputType::currentColor): Returns what color the color
1554         chooser should display.
1555         (WebCore):
1556         (WebCore::ColorInputType::shouldShowSuggestions): Returns if the UI for
1557         suggestions should be shown.
1558         (WebCore::ColorInputType::suggestions): Returns a list of colors to be
1559         suggested to the user.
1560         * html/ColorInputType.h:
1561         (ColorInputType):
1562         * html/HTMLInputElement.h:
1563         (HTMLInputElement): Made dataList() public.
1564         * platform/ColorChooserClient.h:
1565         (ColorChooserClient):
1566
1567 2012-07-25  Kentaro Hara  <haraken@chromium.org>
1568
1569         Replace int with long in test IDL files
1570         https://bugs.webkit.org/show_bug.cgi?id=92181
1571
1572         Reviewed by Adam Barth.
1573
1574         int is not a valid type in WebIDL. It should be long.
1575         We should replace int with long in bindings/scripts/test/*.idl.
1576         This is a follow-up patch for r123550.
1577
1578         Test: bindings/scripts/test/TestObj.idl
1579
1580         * bindings/scripts/test/CPP/WebDOMTestObj.cpp:
1581         (WebDOMTestObj::readOnlyLongAttr):
1582         (WebDOMTestObj::Attr):
1583         (WebDOMTestObj::setAttr):
1584         (WebDOMTestObj::voidMethodWithArgs):
1585         (WebDOMTestObj::Method):
1586         (WebDOMTestObj::MethodWithArgs):
1587         (WebDOMTestObj::objMethodWithArgs):
1588         * bindings/scripts/test/CPP/WebDOMTestObj.h:
1589         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
1590         (webkit_dom_test_obj_set_property):
1591         (webkit_dom_test_obj_get_property):
1592         (webkit_dom_test_obj_class_init):
1593         (webkit_dom_test_obj_void_method_with_args):
1594         (webkit_dom_test_obj_method):
1595         (webkit_dom_test_obj_method_with_args):
1596         (webkit_dom_test_obj_obj_method_with_args):
1597         (webkit_dom_test_obj_get_read_only_long_attr):
1598         (webkit_dom_test_obj_get_attr):
1599         (webkit_dom_test_obj_set_attr):
1600         (webkit_dom_test_obj_get_strawberry):
1601         (webkit_dom_test_obj_set_strawberry):
1602         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
1603         * bindings/scripts/test/JS/JSTestObj.cpp:
1604         (WebCore):
1605         (WebCore::jsTestObjReadOnlyLongAttr):
1606         (WebCore::jsTestObjConstructorStaticReadOnlyLongAttr):
1607         (WebCore::jsTestObjAttr):
1608         (WebCore::setJSTestObjAttr):
1609         (WebCore::setJSTestObjStrawberry):
1610         (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
1611         (WebCore::jsTestObjPrototypeFunctionMethod):
1612         (WebCore::jsTestObjPrototypeFunctionMethodWithArgs):
1613         (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
1614         (WebCore::jsTestObjPrototypeFunctionMethodReturningSequence):
1615         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
1616         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod4):
1617         * bindings/scripts/test/JS/JSTestObj.h:
1618         (WebCore):
1619         * bindings/scripts/test/ObjC/DOMTestObj.h:
1620         * bindings/scripts/test/ObjC/DOMTestObj.mm:
1621         (-[DOMTestObj readOnlyLongAttr]):
1622         (-[DOMTestObj Attr]):
1623         (-[DOMTestObj setAttr:]):
1624         (-[DOMTestObj voidMethodWithArgs:strArg:objArg:]):
1625         (-[DOMTestObj Method]):
1626         (-[DOMTestObj MethodWithArgs:strArg:objArg:]):
1627         (-[DOMTestObj objMethodWithArgs:strArg:objArg:]):
1628         (-[DOMTestObj customMethodWithArgs:strArg:objArg:]):
1629         * bindings/scripts/test/TestObj.idl:
1630         * bindings/scripts/test/V8/V8TestObj.cpp:
1631         (WebCore::TestObjV8Internal::readOnlyLongAttrAttrGetter):
1632         (WebCore::TestObjV8Internal::staticReadOnlyLongAttrAttrGetter):
1633         (WebCore::TestObjV8Internal::AttrAttrGetter):
1634         (WebCore::TestObjV8Internal::AttrAttrSetter):
1635         (WebCore::TestObjV8Internal::strawberryAttrSetter):
1636         (WebCore::TestObjV8Internal::voidMethodWithArgsCallback):
1637         (WebCore::TestObjV8Internal::MethodCallback):
1638         (WebCore::TestObjV8Internal::MethodWithArgsCallback):
1639         (WebCore::TestObjV8Internal::objMethodWithArgsCallback):
1640         (WebCore::TestObjV8Internal::methodReturningSequenceCallback):
1641         (WebCore::TestObjV8Internal::overloadedMethod2Callback):
1642         (WebCore::TestObjV8Internal::overloadedMethod4Callback):
1643         (WebCore):
1644         (WebCore::ConfigureV8TestObjTemplate):
1645
1646 2012-07-25  Shinya Kawanaka  <shinyak@chromium.org>
1647
1648         A validation bubble should not be modifiable.
1649         https://bugs.webkit.org/show_bug.cgi?id=92217
1650
1651         Reviewed by Kent Tamura.
1652
1653         A user can set -webkit-user-modify: read-write to validation message elements.
1654         This might cause a undesired crash like Bug 65738. They should be unmodifiable.
1655
1656         Test: fast/forms/validation-user-modify.html
1657
1658         * css/html.css:
1659         Added -webkit-user-modify: read-only !important; for these elements so that they won't be
1660         changed by a user.
1661         (::-webkit-validation-bubble):
1662         (::-webkit-validation-bubble-message):
1663         (::-webkit-validation-bubble-text-block):
1664         (::-webkit-validation-bubble-heading):
1665         (::-webkit-validation-bubble-arrow):
1666         (::-webkit-validation-bubble-arrow-clipper):
1667
1668 2012-07-25  Zeno Albisser  <zeno@webkit.org>
1669
1670         [Qt][WK2] Disable CopyToTexture for GraphicsSurfaceMac.
1671         https://bugs.webkit.org/show_bug.cgi?id=92159
1672
1673         Disable CopyToTexture feature for GraphicsSurface on Mac.
1674         While this is actually working, it is currently used for Tiles
1675         that are single buffered, and therefore requires a call to glFlush.
1676         This call blocks the GPU for about 40ms which would make smooth animations impossible.
1677
1678         Reviewed by Noam Rosenthal.
1679
1680         * platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp:
1681         (WebCore::GraphicsSurface::platformCreate):
1682         (WebCore::GraphicsSurface::platformImport):
1683
1684 2012-07-25  Kenichi Ishibashi  <bashi@chromium.org>
1685
1686         [Chromium] Fix up includes in HarfBuzzNGFace.h
1687         https://bugs.webkit.org/show_bug.cgi?id=92127
1688
1689         Reviewed by Hajime Morita.
1690
1691         Move constructors of FontPlatformData from headers to corresponding cpp files
1692         so that we can use forward declaration for HarfBuzzNGFace instead of including HarfBuzzNGFace.h.
1693         This way we can include hb.h in HarfBuzzNGFace.h.
1694
1695         No new tests. No changes in behavior.
1696
1697         * platform/graphics/FontPlatformData.cpp:
1698         (WebCore::FontPlatformData::FontPlatformData): Moved from header file.
1699         (WebCore):
1700         * platform/graphics/FontPlatformData.h:
1701         (WebCore):
1702         (FontPlatformData): Moved to cpp file.
1703         * platform/graphics/cocoa/FontPlatformDataCocoa.mm: Include HarfBuzzNGFace.h
1704         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp:
1705         (WebCore::FontPlatformData::FontPlatformData): Moved from header file.
1706         (WebCore):
1707         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h:
1708         (WebCore):
1709         (FontPlatformData): Moved to cpp file.
1710         * platform/graphics/harfbuzz/ng/HarfBuzzNGFace.h: Include hb.h.
1711
1712 2012-07-24  Benjamin Poulain  <bpoulain@apple.com> && Joseph Pecoraro  <pecoraro@apple.com>
1713
1714         QualifiedName's HashSet should be big enough to hold at least all the static names
1715         https://bugs.webkit.org/show_bug.cgi?id=91891
1716
1717         Reviewed by Darin Adler.
1718
1719         QualifiedName's table has a standard size of 64 buckets. When initializing WebKit,
1720         we create 850 static QualifiedName for the standard names (HTMLNames, SVGNames etc).
1721
1722         The small base size forces us to grow and rehash the table several time on startup.
1723
1724         This patch solves the issue by defining the initial table size to the minimum size that
1725         can hold all the static QualifiedName.
1726
1727         * dom/QualifiedName.cpp:
1728         (QualifiedNameHashTraits):
1729         * dom/make_names.pl:
1730         (printNamesHeaderFile):
1731
1732 2012-07-24  Kwang Yul Seo  <skyul@company100.net>
1733
1734         Remove anonymous namespace and make functions static.
1735         https://bugs.webkit.org/show_bug.cgi?id=92214
1736
1737         Reviewed by Adam Barth.
1738
1739         Mark functions as static instead of enclosing them in anonymous namespaces.
1740         One exception to this rule is when a function is passed as a template argument.
1741         In this case, the function must have an external linkage.
1742
1743         No functional change. Covered by existing tests.
1744
1745         * html/parser/HTMLConstructionSite.cpp:
1746         (WebCore::hasImpliedEndTag):
1747         (WebCore::causesFosterParenting):
1748         (WebCore::isAllWhitespace):
1749         * html/parser/HTMLDocumentParser.cpp:
1750         (WebCore):
1751         (WebCore::tokenizerStateForContextElement):
1752         * html/parser/HTMLElementStack.cpp:
1753         (WebCore::isNumberedHeaderElement):
1754         (WebCore::isRootNode):
1755         (WebCore):
1756         * html/parser/HTMLEntityParser.cpp:
1757         (WebCore::isAlphaNumeric):
1758         * html/parser/HTMLEntitySearch.cpp:
1759         (WebCore::halfway):
1760         * html/parser/HTMLPreloadScanner.cpp:
1761         (WebCore):
1762         * html/parser/HTMLTokenizer.cpp:
1763         (WebCore::toLowerCase):
1764         (WebCore::vectorEqualsString):
1765         (WebCore::isEndTagBufferingState):
1766         * html/parser/HTMLTreeBuilder.cpp:
1767         (WebCore):
1768         (WebCore::uninitializedPositionValue1):
1769         (WebCore::isAllWhitespace):
1770         (WebCore::isAllWhitespaceOrReplacementCharacters):
1771         (WebCore::isNumberedHeaderTag):
1772         (WebCore::isCaptionColOrColgroupTag):
1773         (WebCore::isTableCellContextTag):
1774         (WebCore::isTableBodyContextTag):
1775         (WebCore::isSpecialNode):
1776         (WebCore::isNonAnchorNonNobrFormattingTag):
1777         (WebCore::isNonAnchorFormattingTag):
1778         (WebCore::isFormattingTag):
1779         (WebCore::closestFormAncestor):
1780         (WebCore::mapLoweredLocalNameToName):
1781         (WebCore::adjustSVGTagNameCase):
1782         (WebCore::adjustAttributes):
1783         (WebCore::adjustSVGAttributes):
1784         (WebCore::adjustMathMLAttributes):
1785         (WebCore::addNamesWithPrefix):
1786         (WebCore::adjustForeignAttributes):
1787
1788 2012-07-24  Vsevolod Vlasov  <vsevik@chromium.org>
1789
1790         Unreviewed r123494 follow-up: fixed inspector undock icon.
1791
1792         * inspector/front-end/Images/statusbarButtonGlyphs.png:
1793
1794 2012-07-24  Kwang Yul Seo  <skyul@company100.net>
1795
1796         Read tag names and attributes from the saved tokens where possible.
1797         https://bugs.webkit.org/show_bug.cgi?id=92079
1798
1799         Reviewed by Adam Barth.
1800
1801         Read tag names and attributes from the saved tokens, not from the DOM.
1802         Also added convenient methods such as hasLocalName, hasTagName, localName,
1803         isElementNode and isDocumentFragmentNode to HTMLStackItem class.
1804
1805         No new tests, covered by existing tests.
1806
1807         * html/parser/HTMLConstructionSite.cpp:
1808         (WebCore::HTMLNames::hasImpliedEndTag):
1809         (WebCore::HTMLNames::causesFosterParenting):
1810         (WebCore::HTMLConstructionSite::generateImpliedEndTagsWithExclusion):
1811         (WebCore::HTMLConstructionSite::generateImpliedEndTags):
1812         (WebCore::HTMLConstructionSite::shouldFosterParent):
1813         * html/parser/HTMLConstructionSite.h:
1814         (WebCore::HTMLConstructionSite::currentStackItem):
1815         * html/parser/HTMLElementStack.cpp:
1816         (WebCore::HTMLNames::isNumberedHeaderElement):
1817         (WebCore::HTMLNames::isRootNode):
1818         (WebCore::HTMLNames::isScopeMarker):
1819         (WebCore::HTMLNames::isListItemScopeMarker):
1820         (WebCore::HTMLNames::isTableScopeMarker):
1821         (WebCore::HTMLNames::isTableBodyScopeMarker):
1822         (WebCore::HTMLNames::isTableRowScopeMarker):
1823         (WebCore::HTMLNames::isForeignContentScopeMarker):
1824         (WebCore::HTMLNames::isButtonScopeMarker):
1825         (WebCore::HTMLNames::isSelectScopeMarker):
1826         (WebCore::HTMLElementStack::ElementRecord::replaceElement):
1827         (WebCore::HTMLElementStack::popUntilNumberedHeaderElementPopped):
1828         (WebCore::HTMLElementStack::popUntilTableScopeMarker):
1829         (WebCore::HTMLElementStack::popUntilTableBodyScopeMarker):
1830         (WebCore::HTMLElementStack::popUntilTableRowScopeMarker):
1831         (WebCore::HTMLElementStack::isMathMLTextIntegrationPoint):
1832         (WebCore::HTMLElementStack::isHTMLIntegrationPoint):
1833         (WebCore::HTMLElementStack::popUntilForeignContentScopeMarker):
1834         (WebCore::HTMLElementStack::pushRootNode):
1835         (WebCore::HTMLElementStack::oneBelowTop):
1836         (WebCore::HTMLElementStack::topmost):
1837         (WebCore):
1838         (WebCore::inScopeCommon):
1839         (WebCore::HTMLElementStack::hasNumberedHeaderElementInScope):
1840         (WebCore::HTMLElementStack::inScope):
1841         * html/parser/HTMLElementStack.h:
1842         (WebCore::HTMLElementStack::topStackItem):
1843         (HTMLElementStack):
1844         (WebCore::isInHTMLNamespace):
1845         * html/parser/HTMLStackItem.h:
1846         (WebCore::HTMLStackItem::isDocumentFragmentNode):
1847         (WebCore::HTMLStackItem::isElementNode):
1848         (HTMLStackItem):
1849         (WebCore::HTMLStackItem::hasLocalName):
1850         (WebCore::HTMLStackItem::hasTagName):
1851         (WebCore::HTMLStackItem::HTMLStackItem):
1852         * html/parser/HTMLTreeBuilder.cpp:
1853         (WebCore):
1854         (WebCore::HTMLTreeBuilder::constructTreeFromAtomicToken):
1855         (WebCore::HTMLTreeBuilder::processFakeEndTag):
1856         (WebCore::HTMLTreeBuilder::processCloseWhenNestedTag):
1857         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
1858         (WebCore::HTMLTreeBuilder::processStartTag):
1859         (WebCore::HTMLTreeBuilder::processAnyOtherEndTagForInBody):
1860         (WebCore::HTMLTreeBuilder::furthestBlockForFormattingElement):
1861         (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
1862         (WebCore::HTMLTreeBuilder::processEndTagForInTableBody):
1863         (WebCore::HTMLTreeBuilder::processEndTagForInCell):
1864         (WebCore::HTMLTreeBuilder::processEndTagForInBody):
1865         (WebCore::HTMLTreeBuilder::processCaptionEndTagForInCaption):
1866         (WebCore::HTMLTreeBuilder::processTrEndTagForInRow):
1867         (WebCore::HTMLTreeBuilder::processEndTag):
1868         (WebCore::HTMLTreeBuilder::processCharacterBuffer):
1869         (WebCore::HTMLTreeBuilder::processEndOfFile):
1870         (WebCore::HTMLTreeBuilder::shouldProcessTokenInForeignContent):
1871         (WebCore::HTMLTreeBuilder::processTokenInForeignContent):
1872         * html/parser/HTMLTreeBuilder.h:
1873
1874 2012-07-24  Hironori Bono  <hbono@chromium.org>
1875
1876         Avoid moving child objects multiple times when vertical scrollbar are shown at the left side.
1877         https://bugs.webkit.org/show_bug.cgi?id=91756
1878
1879         Reviewed by Tony Chang.
1880
1881         My r123067 moves the top-left origin of an RTL element right when its vertical
1882         scrollbar is shown at its left side. (That is, r123067 moves all child objects
1883         in the RTL element right.) This change also increases RenderBox::clientLeft()
1884         at the same time, i.e. it also moves child objects right. Furthermore, my r109512
1885         moves positioned objects in an RTL element right at the same time. This makes
1886         WebKit move objects in an RTL element up to three times by the scrollbar width.
1887         (Moving an absolute object right increases the scrollWidth value and it causes
1888         this bug.) This change removes unnecessary code that moves objects right in my
1889         r109512 and RenderBox::clientLeft().
1890
1891         Test: scrollbars/rtl/div-absolute.html
1892               fast/block/float/026.html
1893               fast/block/float/028.html
1894               fast/overflow/unreachable-overflow-rtl-bug.html
1895
1896         * dom/Element.cpp:
1897         (WebCore::Element::clientLeft): Increase clientLeft value by the width of a vertical scrollbar as written in the CSSOM specification.
1898         * rendering/RenderBlock.cpp:
1899         (WebCore::RenderBlock::addOverflowFromPositionedObjects): Removed unnecessary code.
1900         (WebCore::RenderBlock::determineLogicalLeftPositionForChild): Removed unnecessary code.
1901         * rendering/RenderBox.h:
1902         (WebCore::RenderBox::clientLeft): Removed unnecessary code.
1903
1904 2012-07-24  Dan Bernstein  <mitz@apple.com>
1905
1906         RenderBlock::positionForPoint can fail when the block or its children have a vertical writing mode
1907         https://bugs.webkit.org/show_bug.cgi?id=92202
1908
1909         Reviewed by Beth Dakin.
1910
1911         Test: fast/writing-mode/positionForPoint.html
1912
1913         * rendering/RenderBlock.cpp:
1914         (WebCore::RenderBlock::positionForPoint): Fixed two issues, each of which are covered by
1915         one of the sub-tests in the new regression test: (1) changed to compare children’s logical
1916         bounds against pointInLogicalContents, i.e. compare childern’s horizontal bounds to the
1917         point’s horizontal component; and (2) changed to use logicalTopForChild and
1918         logicalHeightForChild, which account for this block’s writing mode, instead of logicalTop
1919         and logicalBottom, which are based on the child’s writing mode.
1920
1921 2012-07-24  MORITA Hajime  <morrita@google.com>
1922
1923         https://bugs.webkit.org/show_bug.cgi?id=89179
1924         Rendering LI having Shadow DOM seems weird
1925
1926         Reviewed by Dimitri Glazkov.
1927
1928         This incorrect rendering happend because HTMLLIElement::attach()
1929         wasn't aware of composed shadow subtree. This change makes it
1930         aware of that using ComposedShadowTreeParentWalker.
1931
1932         Test: fast/dom/shadow/shadow-and-list-elements.html
1933
1934         * html/HTMLLIElement.cpp:
1935         (WebCore::HTMLLIElement::attach):
1936
1937 2012-07-24  Alec Flett  <alecflett@chromium.org>
1938
1939         IndexedDB: fix #include dependencies so IDBRequest isn't an include root
1940         https://bugs.webkit.org/show_bug.cgi?id=92167
1941
1942         Reviewed by Tony Chang.
1943
1944         Remove implicit dependencies due to using IDBRequest.h, and fix all
1945         places that break as a result.
1946
1947         * Modules/indexeddb/IDBCallbacks.h:
1948         (WebCore):
1949         * Modules/indexeddb/IDBObjectStore.cpp:
1950         * Modules/indexeddb/IDBRequest.h:
1951         * inspector/InspectorIndexedDBAgent.cpp:
1952
1953 2012-07-24  Keishi Hattori  <keishi@webkit.org>
1954
1955         Move PagePopupClient helper functions so they can be shared
1956         https://bugs.webkit.org/show_bug.cgi?id=92096
1957
1958         Reviewed by Kent Tamura.
1959
1960         Move PagePopupClient helper functions to a separate file,
1961         so they can be shared with new PagePopupClients.
1962
1963         No new tests. Covered by fast/forms/date/calendar-picker-appearance.html
1964
1965         * WebCore.gypi: Added PagePopupClient.cpp
1966         * html/shadow/CalendarPickerElement.cpp:
1967         (WebCore::CalendarPickerElement::writeDocument): Modified to use PagePopupClient.
1968         * page/PagePopupClient.cpp: Added.
1969         (WebCore):
1970         (WebCore::PagePopupClient::addJavaScriptString):
1971         (WebCore::PagePopupClient::addProperty):
1972         * page/PagePopupClient.h:
1973         (WebCore::PagePopupClient::addString):
1974
1975 2012-07-24  Jer Noble  <jer.noble@apple.com>
1976
1977         setting playbackRate on a MediaController doesn't change the playbackRate for slaved media
1978         https://bugs.webkit.org/show_bug.cgi?id=92035
1979
1980         Reviewed by Darin Adler.
1981
1982         Allow updatePlaybackRate() to change the MediaPlayer rate when the media element has a 
1983         current media controller.
1984
1985         Test: media/media-controller-playbackrate.html
1986
1987         * html/HTMLMediaElement.cpp:
1988         (WebCore::HTMLMediaElement::updatePlaybackRate):
1989
1990 2012-07-24  Hayato Ito  <hayato@chromium.org>
1991
1992         Rename FocusScope to FocusNavigationScope.
1993         https://bugs.webkit.org/show_bug.cgi?id=92062
1994
1995         Reviewed by Dimitri Glazkov.
1996
1997         FocusNavagationScope is better name than FocusScope since the
1998         class is only used for controlling focus navigation.
1999
2000         No new tests - no functional changes.
2001
2002         * page/FocusController.cpp:
2003         (WebCore::FocusNavigationScope::FocusNavigationScope):
2004         (WebCore::FocusNavigationScope::rootNode):
2005         (WebCore::FocusNavigationScope::owner):
2006         (WebCore::FocusNavigationScope::focusNavigationScopeOf):
2007         (WebCore::FocusNavigationScope::focusNavigationScopeOwnedByShadowHost):
2008         (WebCore::FocusNavigationScope::focusNavigationScopeOwnedByIFrame):
2009         (WebCore::FocusController::findFocusableNodeDecendingDownIntoFrameDocument):
2010         (WebCore::FocusController::advanceFocusInDocumentOrder):
2011         (WebCore::FocusController::findFocusableNodeAcrossFocusScope):
2012         (WebCore::FocusController::findFocusableNodeRecursively):
2013         (WebCore::FocusController::findFocusableNode):
2014         (WebCore::FocusController::nextFocusableNode):
2015         (WebCore::FocusController::previousFocusableNode):
2016         * page/FocusController.h:
2017         (FocusNavigationScope):
2018         (FocusController):
2019
2020 2012-07-24  Michael Saboff  <msaboff@apple.com>
2021
2022         Convert HTML parser to handle 8-bit resources without converting to UChar*
2023         https://bugs.webkit.org/show_bug.cgi?id=90321
2024
2025         Reviewed by Geoffrey Garen.
2026
2027         No new tests, no new functionality therefore covered by existing tests.
2028
2029         Changed the parsing of HTML to handle 8-bit strings without converting the 
2030         whole string to 16-bits.  Primary change was to use the appropriate 
2031         character pointer type (LChar* or UChar*) depending on the source string.
2032         This access is abstracted in SegmentedSubstring by getCurrentChar{8,16} and
2033         incrementAndGetCurrentChar{8,16} methods.  In SegmentedString, the advance()
2034         and advanceAndUpdateLineNumber() methods have been refactored into a
2035         state machine managed pair of function pointers.  The possible functions
2036         have not only the 8 and 16 bitness factored out, they also have the 
2037         "exclude line numbers" logic factored out for advanceAndUpdateLineNumber().
2038         This provides a net speed-up even with the 8/16 bit testing.
2039         Other changes involve using String methods to access and compare with the
2040         source data.
2041
2042         * html/FTPDirectoryDocument.cpp:
2043         (WebCore::FTPDirectoryDocumentParser::append): Changed to use currentChar()
2044         instead of SegmentedString '*' operator.
2045         * html/parser/HTMLEntityParser.cpp: Changed to use currentChar() instead of
2046         SegmentedString '*' operator.
2047         * html/parser/HTMLParserIdioms.cpp:
2048         (WebCore::stripLeadingAndTrailingHTMLSpaces): Added 8-bit fast path.
2049         * html/parser/HTMLSourceTracker.cpp:
2050         (WebCore::HTMLSourceTracker::sourceForToken): Changed to use currentChar() instead of
2051         SegmentedString '*' operator.
2052         * loader/cache/CachedScript.cpp:
2053         (WebCore::CachedScript::script): Updated to use new String::dataSize() method.
2054         * platform/text/SegmentedString.cpp:
2055         (WebCore::SegmentedString::SegmentedString):
2056         (WebCore::SegmentedString::operator=):
2057         (WebCore::SegmentedString::clear):
2058         (WebCore::SegmentedString::append):
2059         (WebCore::SegmentedString::prepend):
2060         (WebCore::SegmentedString::advanceSubstring):
2061         (WebCore::SegmentedString::advance): Changed to be a wrapper that invokes current 
2062         advance function.
2063         (WebCore::SegmentedString::advance8): Fast path advance function for 8 bit data.
2064         (WebCore::SegmentedString::advance16): Fast path advance function for 16 bit data.
2065         (WebCore::SegmentedString::advanceAndUpdateLineNumber8IncludeLineNumbers): Fast
2066         path advanceAndUpdateLineNumber for 8 bit data when we need to update the line number.
2067         (WebCore::SegmentedString::advanceAndUpdateLineNumber16IncludeLineNumbers): Fast
2068         path advanceAndUpdateLineNumber for 16 bit data when we need to update the line number.
2069         (WebCore::SegmentedString::advanceSlowCase): Slow case advance function for both
2070         8 and 16 bit advance.
2071         (WebCore::SegmentedString::advanceAndUpdateLineNumberSlowCase): Slow case
2072         advanceAndUpdateLineNumber function for both 8 and 16 bit data.
2073         (WebCore::SegmentedString::advanceEmpty): Advance function when input has been exhausted.
2074         * platform/text/SegmentedString.h:
2075         (WebCore::SegmentedSubstring::SegmentedSubstring):
2076         (WebCore::SegmentedSubstring::clear):
2077         (SegmentedSubstring):
2078         (WebCore::SegmentedSubstring::is8Bit): New getter.
2079         (WebCore::SegmentedSubstring::appendTo):
2080         (WebCore::SegmentedSubstring::getCurrentChar8): New getter for the 8 bit case.
2081         (WebCore::SegmentedSubstring::getCurrentChar16): New getter for the 16 bit case.
2082         (WebCore::SegmentedSubstring::incrementAndGetCurrentChar8): New wrapper functions
2083         that pre-increments the 8 bit pointer and returns the next character.
2084         (WebCore::SegmentedSubstring::incrementAndGetCurrentChar16): New wrapper functions
2085         that pre-increments the 16 bit pointer and returns the next character.
2086         (WebCore::SegmentedSubstring::currentSubString):
2087         (WebCore::SegmentedSubstring::getCurrentChar):
2088         (WebCore::SegmentedSubstring::incrementAndGetCurrentChar):
2089         (WebCore::SegmentedString::SegmentedString):
2090         (WebCore::SegmentedString::push):
2091         (WebCore::SegmentedString::isEmpty):
2092         (WebCore::SegmentedString::lookAhead):
2093         (WebCore::SegmentedString::lookAheadIgnoringCase):
2094         (WebCore::SegmentedString::advance):
2095         (WebCore::SegmentedString::advanceAndUpdateLineNumber):
2096         (WebCore::SegmentedString::advanceAndASSERT):
2097         (WebCore::SegmentedString::advanceAndASSERTIgnoringCase):
2098         (WebCore::SegmentedString::advancePastNonNewline):
2099         (WebCore::SegmentedString::advancePastNewlineAndUpdateLineNumber):
2100         (WebCore::SegmentedString::currentChar):
2101         (WebCore::SegmentedString::setSlowCase): Set advance function pointers to slow case
2102         functions.
2103         (WebCore::SegmentedString::decrementAndCheckLength): Decrement substring length and
2104         change to slow case functions when only one character left.
2105         (WebCore::SegmentedString::setAdvanceFunctionPointers): Select appropriate advance
2106         functions based on current substring.
2107         (WebCore::SegmentedString::lookAheadInline): Changed to use String::startsWith().
2108         (WebCore::SegmentedString::lookAheadSlowCase):
2109         * xml/parser/CharacterReferenceParserInlineMethods.h:
2110         (WebCore::consumeCharacterReference): Changed to use currentChar() instead of
2111         SegmentedString '*' operator.
2112         * xml/parser/MarkupTokenizerBase.h:
2113         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::nextInputCharacter):
2114         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::peek): Changed to use
2115         currentChar() instead of SegmentedString '*' operator.
2116         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::advance):
2117
2118 2012-07-24  Kenneth Russell  <kbr@google.com>
2119
2120         [chromium] Hint garbage collector to run if page uses Canvas contexts
2121         https://bugs.webkit.org/show_bug.cgi?id=76225
2122
2123         Reviewed by Kentaro Hara.
2124
2125         Upon creating a canvas context, set a hint in the current isolate
2126         indicating that a full GC should be done upon the next page
2127         navigation.
2128
2129         This improves Chrome's robustness on some WebGL stress tests which
2130         simulate real-world behavior by repeatedly navigating among
2131         several samples. More general measures are being investigated, but
2132         this change makes V8 behave the same as JSC on these stress tests.
2133         JSC doesn't currently use generational garbage collection, so it
2134         has more opportunities to discover unreferenced canvas contexts.
2135
2136         Test: fast/canvas/webgl/context-creation-and-destruction.html
2137
2138         * bindings/v8/V8Binding.cpp:
2139         (WebCore::V8BindingPerIsolateData::V8BindingPerIsolateData):
2140             Initialize per-isolate low memory hint.
2141         * bindings/v8/V8Binding.h:
2142         (V8BindingPerIsolateData):
2143         (WebCore::V8BindingPerIsolateData::setLowMemoryNotificationHint):
2144             Set a per-isolate hint to signal a low memory condition upon the next page navigation.
2145         (WebCore::V8BindingPerIsolateData::clearLowMemoryNotificationHint):
2146             Clear the previously set hint.
2147         (WebCore::V8BindingPerIsolateData::isLowMemoryNotificationHint):
2148             Get the previously set hint.
2149         * bindings/v8/V8Proxy.cpp:
2150         (WebCore::V8Proxy::hintForGCIfNecessary):
2151             If necessary, send V8 a hint that it should GC.
2152         (WebCore):
2153         (WebCore::V8Proxy::clearForClose):
2154         (WebCore::V8Proxy::clearForNavigation):
2155             Call hintForGCIfNecessary.
2156         * bindings/v8/V8Proxy.h:
2157         (V8Proxy):
2158         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
2159         (WebCore::V8HTMLCanvasElement::getContextCallback):
2160             Set a hint that we should GC upon the next page navigation.
2161
2162 2012-07-24  Dave Tu  <dtu@chromium.org>
2163
2164         [chromium] Add time spent painting to GPU benchmarking renderingStats() API.
2165         https://bugs.webkit.org/show_bug.cgi?id=90019
2166
2167         Reviewed by Adrienne Walker.
2168
2169         * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.cpp:
2170         (WebCore::BitmapCanvasLayerTextureUpdater::prepareToUpdate):
2171         * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.h:
2172         (BitmapCanvasLayerTextureUpdater):
2173         * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.cpp:
2174         (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::Texture::prepareRect):
2175         (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::prepareToUpdate):
2176         (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::paintContentsRect):
2177         * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.h:
2178         (Texture):
2179         (BitmapSkPictureCanvasLayerTextureUpdater):
2180         * platform/graphics/chromium/CanvasLayerTextureUpdater.cpp:
2181         (WebCore::CanvasLayerTextureUpdater::paintContents):
2182         * platform/graphics/chromium/CanvasLayerTextureUpdater.h:
2183         (CanvasLayerTextureUpdater):
2184         * platform/graphics/chromium/ContentLayerChromium.cpp:
2185         (WebCore::ContentLayerChromium::update):
2186         * platform/graphics/chromium/ContentLayerChromium.h:
2187         (ContentLayerChromium):
2188         * platform/graphics/chromium/ImageLayerChromium.cpp:
2189         (WebCore::ImageLayerChromium::update):
2190         * platform/graphics/chromium/ImageLayerChromium.h:
2191         (ImageLayerChromium):
2192         * platform/graphics/chromium/LayerChromium.h:
2193         (WebCore):
2194         (WebCore::LayerChromium::update):
2195         * platform/graphics/chromium/LayerTextureUpdater.h:
2196         (WebCore):
2197         (WebCore::LayerTextureUpdater::Texture::prepareRect):
2198         (WebCore::LayerTextureUpdater::prepareToUpdate):
2199         * platform/graphics/chromium/ScrollbarLayerChromium.cpp:
2200         (WebCore::ScrollbarLayerChromium::updatePart):
2201         (WebCore::ScrollbarLayerChromium::update):
2202         * platform/graphics/chromium/ScrollbarLayerChromium.h:
2203         (ScrollbarLayerChromium):
2204         * platform/graphics/chromium/SkPictureCanvasLayerTextureUpdater.cpp:
2205         (WebCore::SkPictureCanvasLayerTextureUpdater::prepareToUpdate):
2206         * platform/graphics/chromium/SkPictureCanvasLayerTextureUpdater.h:
2207         (SkPictureCanvasLayerTextureUpdater):
2208         * platform/graphics/chromium/TiledLayerChromium.cpp:
2209         (WebCore::TiledLayerChromium::updateTiles):
2210         (WebCore::TiledLayerChromium::updateContentRect):
2211         * platform/graphics/chromium/TiledLayerChromium.h:
2212         (TiledLayerChromium):
2213         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
2214         (WebCore::CCLayerTreeHost::CCLayerTreeHost):
2215         (WebCore::CCLayerTreeHost::updateAnimations):
2216         (WebCore::CCLayerTreeHost::renderingStats):
2217         (WebCore::CCLayerTreeHost::paintMasksForRenderSurface):
2218         (WebCore::CCLayerTreeHost::paintLayerContents):
2219         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
2220         (WebCore):
2221         (CCLayerTreeHost):
2222         * platform/graphics/chromium/cc/CCRenderingStats.h:
2223         (CCRenderingStats):
2224         (WebCore::CCRenderingStats::CCRenderingStats):
2225
2226 2012-07-24  Jian Li  <jianli@chromium.org>
2227
2228         [V8] Correct WebIDL type should be used in the testing IDL file 
2229         https://bugs.webkit.org/show_bug.cgi?id=92168
2230
2231         Reviewed by Kentaro Hara.
2232
2233         Updated bindings test.
2234
2235         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
2236         (webkit_dom_test_obj_strict_function):
2237         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
2238         * bindings/scripts/test/JS/JSTestObj.cpp:
2239         (WebCore::jsTestObjPrototypeFunctionStrictFunction):
2240         * bindings/scripts/test/TestObj.idl:
2241         * bindings/scripts/test/V8/V8TestObj.cpp:
2242         (WebCore::TestObjV8Internal::enabledAtRuntimeMethod1Callback):
2243         (WebCore::TestObjV8Internal::enabledAtRuntimeMethod2Callback):
2244         (WebCore::TestObjV8Internal::enabledPerContextMethod1Callback):
2245         (WebCore::TestObjV8Internal::enabledPerContextMethod2Callback):
2246         (WebCore::TestObjV8Internal::strictFunctionCallback):
2247
2248 2012-07-24  Kent Tamura  <tkent@chromium.org>
2249
2250         Unreviewed, rolling out r123191.
2251         http://trac.webkit.org/changeset/123191
2252         https://bugs.webkit.org/show_bug.cgi?id=91804
2253
2254         It might cause another performance regression.
2255         http://code.google.com/p/chromium/issues/detail?id=138410
2256
2257         * html/FormController.cpp:
2258         (FormKeyGenerator):
2259         (WebCore::createKey):
2260         (WebCore::FormKeyGenerator::formKey):
2261         (WebCore::FormKeyGenerator::willDeleteForm):
2262
2263 2012-07-24  Vineet Chaudhary  <rgf748@motorola.com>
2264
2265         [JSBinding] Merging jsUnsignedLongArrayToVector() to toNativeArray() using traits.
2266         https://bugs.webkit.org/show_bug.cgi?id=90381
2267
2268         Reviewed by Kentaro Hara.
2269
2270         We can remove jsUnsignedLongArrayToVector() implementaion
2271         merging it to current and toNativeArray() traits.
2272
2273         Tests: TestObj.idl
2274         There should be no behavoiral changes as just refactoring.
2275
2276         * Modules/vibration/NavigatorVibration.idl: Use sequence<T> as method param than T[]
2277         * bindings/js/JSDOMBinding.cpp: Moved toJSSequence() to header file.
2278         * bindings/js/JSDOMBinding.h:
2279         (WebCore::toJSSequence): Moved toJSSequence() to header file.
2280         (WebCore::jsArray): Renamed Traits to JSValueTraits
2281         (WebCore::toNativeArray): Using traits.
2282         * bindings/js/JSDictionary.cpp:
2283         (WebCore::JSDictionary::convertValue):
2284         * bindings/js/JSMessagePortCustom.cpp:
2285         (WebCore::fillMessagePortArray):
2286         * bindings/scripts/CodeGeneratorJS.pm: Removed unsigned long[] specific binding code.
2287         (AddIncludesForType):
2288         (GenerateParametersCheckExpression):
2289         (JSValueToNative):
2290         (NativeToJSValue):
2291         * bindings/scripts/CodeGeneratorV8.pm:
2292         (GenerateParametersCheckExpression): Added check sequence<T> check for overloaded methods.
2293         * bindings/scripts/test/JS/JSTestObj.cpp: Rebased binding test.
2294         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod10):
2295         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod):
2296         (WebCore::jsTestObjPrototypeFunctionMethodWithUnsignedLongSequence):
2297         * bindings/scripts/test/JS/JSTestObj.h: Rebased binding test.
2298         * bindings/scripts/test/TestObj.idl: Added test for sequence<T> as method parameter.
2299         * bindings/scripts/test/V8/V8TestObj.cpp: Rebased binding test.
2300         (WebCore::TestObjV8Internal::overloadedMethod10Callback):
2301         (TestObjV8Internal):
2302         (WebCore::TestObjV8Internal::overloadedMethodCallback):
2303
2304 2012-07-24  Kwang Yul Seo  <skyul@company100.net>
2305
2306         Remove an invalid assertion introduced in r123536. Unreviewed.
2307
2308         * xml/parser/MarkupTokenBase.h:
2309         (WebCore::AtomicMarkupTokenBase::clearExternalCharacters):
2310
2311 2012-07-24  Sheriff Bot  <webkit.review.bot@gmail.com>
2312
2313         Unreviewed, rolling out r123504.
2314         http://trac.webkit.org/changeset/123504
2315         https://bugs.webkit.org/show_bug.cgi?id=92169
2316
2317         broke a bunch of text-related tests in chromium mac debug
2318         (Requested by zhenyao on #webkit).
2319
2320         * platform/text/cf/StringCF.cpp:
2321         (WTF::String::createCFString):
2322         * platform/text/cf/StringImplCF.cpp:
2323         (WTF::StringImpl::createCFString):
2324
2325 2012-07-24  Kwang Yul Seo  <skyul@company100.net>
2326
2327         Ensure Noah's ark without reading the DOM tree.
2328         https://bugs.webkit.org/show_bug.cgi?id=92065
2329
2330         Reviewed by Adam Barth.
2331
2332         Technically we shouldn't read attributes back from the DOM. If JavaScript changes
2333         the attributes values, we could get a slightly wrong output here.
2334
2335         Read attributes from tokens saved in the active formatting element list.
2336
2337         No new tests, covered by existing tests.
2338
2339         * html/parser/HTMLFormattingElementList.cpp:
2340         (WebCore::attributeCount):
2341         (WebCore::HTMLFormattingElementList::append):
2342         (WebCore::HTMLFormattingElementList::tryToEnsureNoahsArkConditionQuickly):
2343         (WebCore::HTMLFormattingElementList::ensureNoahsArkCondition):
2344         * html/parser/HTMLFormattingElementList.h:
2345         (HTMLFormattingElementList):
2346         * html/parser/HTMLStackItem.h:
2347         (WebCore::HTMLStackItem::localName):
2348         (HTMLStackItem):
2349
2350 2012-07-23  Kwang Yul Seo  <skyul@company100.net>
2351
2352         Clear the external characters pointer of an AtomicHTMLToken before the raw token is cleared.
2353         https://bugs.webkit.org/show_bug.cgi?id=92056
2354
2355         Reviewed by Adam Barth.
2356
2357         AtomicHTMLToken keeps a pointer to the HTMLToken's buffer instead of copying the
2358         characters for performance. Clear the external characters pointer before the raw token
2359         is cleared to make sure that we won't have a dangling pointer.
2360
2361         No new tests - no functional changes.
2362
2363         * html/parser/HTMLTreeBuilder.cpp:
2364         (WebCore::HTMLTreeBuilder::constructTreeFromToken):
2365         * xml/parser/MarkupTokenBase.h:
2366         (WebCore::AtomicMarkupTokenBase::clearExternalCharacters):
2367         (AtomicMarkupTokenBase):
2368
2369 2012-07-24  Jian Li  <jianli@chromium.org>
2370
2371         Add per-context setting for html notifications
2372         https://bugs.webkit.org/show_bug.cgi?id=91295
2373
2374         Reviewed by Adam Barth.
2375
2376         Added a new per-context setting to control the enabling of html notifications.
2377         For chromium port, we're going to disable html notifications for web
2378         pages, but still keep it enabled for extensions.
2379
2380         Also enhance V8 code generator to support V8EnabledPerContext attribute
2381         for methods.
2382
2383         Updated the binding tests.
2384
2385         * Modules/notifications/NotificationCenter.cpp:
2386         (WebCore::NotificationCenter::document): Expose document for being used by installPerContextProperties.
2387         (WebCore):
2388         * Modules/notifications/NotificationCenter.h:
2389         (NotificationCenter):
2390         * Modules/notifications/NotificationCenter.idl: Add V8EnabledPerContext attribute.
2391         * bindings/scripts/CodeGeneratorV8.pm: V8EnabledPerContext now supports methods.
2392         (GenerateHeader):
2393         (IsStandardFunction):
2394         (GenerateNonStandardFunction):
2395         (GenerateImplementation):
2396         (GenerateToV8Converters):
2397         (GetContextEnableFunction):
2398         * bindings/scripts/test/TestObj.idl: Add test case for V8EnabledPerContext methods.
2399         * bindings/scripts/test/V8/V8TestObj.cpp: Update test result.
2400         (WebCore::TestObjV8Internal::enabledAtContextMethod1Callback):
2401         (TestObjV8Internal):
2402         (WebCore::TestObjV8Internal::enabledAtContextMethod2Callback):
2403         (WebCore::V8TestObj::installPerContextProperties):
2404         (WebCore::V8TestObj::wrapSlow):
2405         * dom/ContextFeatures.cpp: Add a new per-context feature.
2406         (WebCore::ContextFeatures::htmlNotificationsEnabled):
2407         (WebCore):
2408         * dom/ContextFeatures.h: Add a new per-context feature.
2409
2410 2012-07-24  Sheriff Bot  <webkit.review.bot@gmail.com>
2411
2412         Unreviewed, rolling out r123499.
2413         http://trac.webkit.org/changeset/123499
2414         https://bugs.webkit.org/show_bug.cgi?id=92161
2415
2416         Android fails to compile (Requested by zhenyao on #webkit).
2417
2418         * GNUmakefile.list.am:
2419         * Modules/mediastream/MediaStream.cpp:
2420         (WebCore::MediaStream::MediaStream):
2421         (WebCore::MediaStream::addTrack):
2422         * Modules/mediastream/MediaStreamTrack.cpp:
2423         (WebCore::MediaStreamTrack::create):
2424         (WebCore::MediaStreamTrack::MediaStreamTrack):
2425         (WebCore::MediaStreamTrack::~MediaStreamTrack):
2426         (WebCore::MediaStreamTrack::setEnabled):
2427         * Modules/mediastream/MediaStreamTrack.h:
2428         (MediaStreamTrack):
2429         * Modules/mediastream/MediaStreamTrack.idl:
2430         * WebCore.gypi:
2431         * dom/EventNames.h:
2432         (WebCore):
2433         * dom/EventTargetFactory.in:
2434         * platform/chromium/support/WebMediaStreamDescriptor.cpp:
2435         (WebKit):
2436         (WebKit::WebMediaStreamDescriptor::sources):
2437         * platform/chromium/support/WebMediaStreamSource.cpp:
2438         * platform/mediastream/MediaStreamSource.cpp: Removed.
2439         * platform/mediastream/MediaStreamSource.h:
2440         (WebCore::MediaStreamSource::create):
2441         (WebCore::MediaStreamSource::muted):
2442         (WebCore::MediaStreamSource::setMuted):
2443         (WebCore::MediaStreamSource::MediaStreamSource):
2444         (MediaStreamSource):
2445         * platform/mediastream/chromium/MediaStreamCenterChromium.cpp:
2446         (WebCore::MediaStreamCenterChromium::queryMediaStreamSources):
2447         (WebCore::MediaStreamCenterChromium::didCreateMediaStream):
2448
2449 2012-07-24  Julien Chaffraix  <jchaffraix@webkit.org>
2450
2451         Crash in RenderTableSection::layoutRows
2452         https://bugs.webkit.org/show_bug.cgi?id=92145
2453
2454         Reviewed by Abhishek Arya.
2455
2456         The crash came from the insertChildNode logic being confused and choosing the wrong
2457         renderer for insertion. This is because after r123159, table anonymous wrappers can
2458         be created as 'inline-table' and wouldn't pass the isAnonymousBlock() check.
2459
2460         This change also aligns the ancestor iteration with RenderBlock::addChildToAnonymousColumnBlocks.
2461
2462         Test: fast/table/crash-table-section-layoutRows.html
2463
2464         * rendering/RenderObjectChildList.cpp:
2465         (WebCore::RenderObjectChildList::insertChildNode):
2466         Changed the code to always get the right child. There is no justification to not
2467         walking up to the |owner|'s direct child in all cases.
2468
2469 2012-07-24  Tony Chang  <tony@chromium.org>
2470
2471         Make RenderBlock::paintChildren virtual so sub classes can change the paint order
2472         https://bugs.webkit.org/show_bug.cgi?id=92042
2473
2474         Reviewed by Ojan Vafai.
2475
2476         The flexbox spec says that the order property should change the paint order of flex children.
2477         To make that possible, make paintChildren virtual so RenderFlexibleBox can override it.
2478
2479         No new tests, this is just a refactoring.
2480
2481         * rendering/RenderBlock.cpp:
2482         (WebCore::RenderBlock::paintContents): Move some code out of paintChildren into paintContents.
2483         (WebCore::RenderBlock::paintChildren): Make virtual and just have it be a simple for loop.
2484         (WebCore::RenderBlock::paintChild): Move code out of paintChildren so subclasses can reuse.
2485         * rendering/RenderBlock.h:
2486         (RenderBlock): Make paintChildren virtual and protected so sub classes can call paintChild.
2487
2488 2012-07-24  Anna Cavender  <annacc@chromium.org>
2489
2490         Create SourceBuffer and SourceBufferList objects
2491         https://bugs.webkit.org/show_bug.cgi?id=91771
2492
2493         Reviewed by Eric Carlson.
2494
2495         SourceBuffer and SourceBufferList objects are needed in order to
2496         implement the new object-oriented MediaSource API:
2497         http://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html
2498
2499         No new tests - will be able to test after landing BUGWK91775
2500
2501         Adding new files to build files:
2502         * CMakeLists.txt:
2503         * DerivedSources.cpp:
2504         * DerivedSources.make:
2505         * DerivedSources.pri:
2506         * GNUmakefile.am:
2507         * GNUmakefile.list.am:
2508         * Target.pri:
2509         * WebCore.gyp/WebCore.gyp:
2510         * WebCore.gypi:
2511         * WebCore.vcproj/WebCore.vcproj:
2512         * WebCore.vcproj/WebCoreCommon.vsprops:
2513         * WebCore.vcproj/copyForwardingHeaders.cmd:
2514         * WebCore.xcodeproj/project.pbxproj:
2515
2516         New objects:
2517         * Modules/mediasource/SourceBuffer.cpp: Added.
2518         * Modules/mediasource/SourceBuffer.h: Added.
2519         * Modules/mediasource/SourceBuffer.idl: Added.
2520         * Modules/mediasource/SourceBufferList.cpp: Added.
2521         * Modules/mediasource/SourceBufferList.h: Added.
2522         * Modules/mediasource/SourceBufferList.idl: Added.
2523
2524         New events:
2525         * dom/EventNames.h:
2526         (WebCore):
2527         * dom/EventTarget.h:
2528         (WebCore):
2529         * dom/EventTargetFactory.in:
2530
2531         Object constructors:
2532         * page/DOMWindow.idl:
2533
2534 2012-07-24  Patrick Gansterer  <paroga@webkit.org>
2535
2536         Store the full year in GregorianDateTime
2537         https://bugs.webkit.org/show_bug.cgi?id=92067
2538
2539         Reviewed by Geoffrey Garen.
2540
2541         Use the full year instead of the offset from year 1900 
2542         for the year member variable of GregorianDateTime.
2543
2544         * bridge/qt/qt_runtime.cpp:
2545         (JSC::Bindings::convertValueToQVariant):
2546         (JSC::Bindings::convertQVariantToValue):
2547         * bridge/qt/qt_runtime_qt4.cpp:
2548         (JSC::Bindings::convertValueToQVariant):
2549         (JSC::Bindings::convertQVariantToValue):
2550
2551 2012-07-24  Benjamin Poulain  <bpoulain@apple.com>
2552
2553         Do not perform 8 to 16bits characters conversion when converting a WTFString to NSString/CFString
2554         https://bugs.webkit.org/show_bug.cgi?id=90720
2555
2556         Reviewed by Geoffrey Garen.
2557
2558         In most String to CFString conversion, we should be able to use the "NoCopy" constructor and have
2559         a relatively cheap conversion from WTF::String to CFString.
2560
2561         When the String is 8 bits, it was converted to 16 bits by getData16SlowCase() because of the call
2562         to String::characters().
2563
2564         This patch adds a path for creating a CFString from a 8bits string using CFStringCreateWithBytes.
2565
2566         This is covered by existing tests.
2567
2568         * platform/text/cf/StringCF.cpp:
2569         (WTF::String::createCFString): CFSTR() create static CFString, it is unecessary to retain it.
2570         * platform/text/cf/StringImplCF.cpp:
2571         (WTF::StringImpl::createCFString): The logic to avoid the StringWrapperCFAllocator has also been simplified.
2572         The allocator creation is now closer to where it is useful.
2573
2574 2012-07-24  Kentaro Hara  <haraken@chromium.org>
2575
2576         [V8] String wrappers should be marked Independent
2577         https://bugs.webkit.org/show_bug.cgi?id=91251
2578
2579         Reviewed by Adam Barth.
2580
2581         Currently V8 String wrappers are not marked Independent.
2582         By marking them Independent, they can be reclaimed by the scavenger GC.
2583         Although I couldn't find a case where this change reduces memory usage,
2584         this change would be important for upcoming changes in string conversion
2585         between V8 and WebKit (https://bugs.webkit.org/show_bug.cgi?id=91850).
2586
2587         'm_lastStringImpl = 0' in StringCache::remove() is important.
2588         Look at the following code:
2589
2590             static void cachedStringCallback(v8::Persistent<v8::Value> wrapper, void* parameter)
2591             {
2592                 ...;
2593                 stringCache()->remove(stringImpl);
2594                 wrapper.Dispose();
2595             }
2596
2597             void StringCache::remove(StringImpl* stringImpl)
2598             {
2599                 ...
2600                 if (m_lastStringImpl.get() == stringImpl)
2601                     m_lastStringImpl = 0;
2602             }
2603
2604             v8::Local<v8::String> v8ExternalString(StringImpl* stringImpl, v8::Isolate* isolate)
2605             {
2606                 if (m_lastStringImpl.get() == stringImpl) {
2607                     return v8::Local<v8::String>::New(m_lastV8String); // m_lastV8String points to a wrapper object that was accessed most recently.
2608                 }
2609                 return v8ExternalStringSlow(stringImpl, isolate);
2610             }
2611
2612         Without 'm_lastStringImpl = 0', already disposed m_lastV8String can be used
2613         in v8ExternalString(). This was a cause of the crashes of r122614.
2614
2615         Tests: At the initial commit of this patch (r122614),
2616                the following tests had been broken due to missing 'm_lastStringImpl = 0'.
2617                fast/workers/worker-location.html
2618                Dromaeo/cssquery-jquery.html
2619                Dromaeo/jslib-event-jquery.html
2620                Dromaeo/jslib-style-jquery.html
2621                Dromaeo/jslib-style-prototype.html
2622
2623         * bindings/v8/V8Binding.cpp:
2624         (WebCore::StringCache::remove):
2625         (WebCore::StringCache::v8ExternalStringSlow):
2626
2627 2012-07-24  Tommy Widenflycht  <tommyw@google.com>
2628
2629         MediaStream API: Update MediaStreamTrack to match the specification
2630         https://bugs.webkit.org/show_bug.cgi?id=90180
2631
2632         Reviewed by Adam Barth.
2633
2634         MediaStreamTracks are now required to show the status of the underlying source,
2635         and trigger events when that status changes.
2636
2637         Test: fast/mediastream/MediaStreamTrack.html
2638
2639         * GNUmakefile.list.am:
2640         * Modules/mediastream/MediaStream.cpp:
2641         (WebCore::MediaStream::MediaStream):
2642         (WebCore::MediaStream::addTrack):
2643         * Modules/mediastream/MediaStreamTrack.cpp:
2644         (WebCore::MediaStreamTrack::create):
2645         (WebCore::MediaStreamTrack::MediaStreamTrack):
2646         (WebCore::MediaStreamTrack::~MediaStreamTrack):
2647         (WebCore::MediaStreamTrack::setEnabled):
2648         (WebCore::MediaStreamTrack::readyState):
2649         (WebCore):
2650         (WebCore::MediaStreamTrack::sourceChangedState):
2651         (WebCore::MediaStreamTrack::stop):
2652         (WebCore::MediaStreamTrack::interfaceName):
2653         (WebCore::MediaStreamTrack::scriptExecutionContext):
2654         (WebCore::MediaStreamTrack::eventTargetData):
2655         (WebCore::MediaStreamTrack::ensureEventTargetData):
2656         * Modules/mediastream/MediaStreamTrack.h:
2657         * Modules/mediastream/MediaStreamTrack.idl:
2658         * WebCore.gypi:
2659         * dom/EventNames.h:
2660         (WebCore):
2661         * dom/EventTargetFactory.in:
2662         * platform/chromium/support/WebMediaStreamDescriptor.cpp:
2663         * platform/chromium/support/WebMediaStreamSource.cpp:
2664         (WebKit::WebMediaStreamSource::setReadyState):
2665         (WebKit):
2666         (WebKit::WebMediaStreamSource::readyState):
2667         * platform/mediastream/MediaStreamSource.cpp: Copied from Source/WebCore/platform/mediastream/MediaStreamSource.h.
2668         (WebCore):
2669         (WebCore::MediaStreamSource::create):
2670         (WebCore::MediaStreamSource::MediaStreamSource):
2671         (WebCore::MediaStreamSource::setReadyState):
2672         (WebCore::MediaStreamSource::addObserver):
2673         (WebCore::MediaStreamSource::removeObserver):
2674         * platform/mediastream/MediaStreamSource.h:
2675         (Observer):
2676         (WebCore::MediaStreamSource::Observer::~Observer):
2677         (MediaStreamSource):
2678         (WebCore::MediaStreamSource::readyState):
2679         * platform/mediastream/chromium/MediaStreamCenterChromium.cpp:
2680         (WebCore::MediaStreamCenterChromium::queryMediaStreamSources):
2681         (WebCore::MediaStreamCenterChromium::didCreateMediaStream):
2682
2683 2012-07-24  Scott Graham  <scottmg@chromium.org>
2684
2685         Use native (non-cygwin) binaries for perl, gperf, and bison in Chromium
2686         https://bugs.webkit.org/show_bug.cgi?id=91667
2687
2688         Reviewed by Tony Chang.
2689
2690         Using native tools instead of cygwin version improves build time
2691         performance by roughly 50% (on top of previous cl-instead-of-gcc
2692         change).
2693
2694         Also, use - instead of / for cl flags, otherwise preprocessing fails
2695         very slowly (due to retry loop). And, replace \ with / in gperf
2696         command line. Without this, gperf emits the filename literally in
2697         #line directives which causes VS to error with "unescaped \ in
2698         string". Bizarrely, building ColorData.cpp with those \ in place
2699         causes the IDE to exit with no error message, which was the cause of
2700         the previous canary failures.
2701
2702         No new tests.
2703
2704         * WebCore.gyp/WebCore.gyp:
2705         * WebCore.gyp/scripts/rule_bison.py:
2706         * bindings/scripts/preprocessor.pm:
2707         (applyPreprocessor):
2708         * make-hash-tools.pl:
2709
2710 2012-07-24  Daniel Cheng  <dcheng@chromium.org>
2711
2712         Files from drag and file <input> should use getMIMETypeForExtension to determine content type.
2713         https://bugs.webkit.org/show_bug.cgi?id=91702
2714
2715         Reviewed by Jian Li.
2716
2717         Awhile back, we changed File to only use getWellKnownMIMETypeForExtension to prevent web
2718         pages from being able to detect what applications a user has installed indirectly through
2719         the MIME types. However, some sites like YouTube's drag and drop uploader use MIME types
2720         that aren't in WebKit's internal list, so we relax the restriction for Files that originate
2721         from an user action.
2722
2723         * fileapi/File.cpp:
2724         (WebCore::getContentTypeFromFileName):
2725         (WebCore::createBlobDataForFile):
2726         (WebCore::createBlobDataForFileWithName):
2727         (WebCore::createBlobDataForFileWithMetadata):
2728         (WebCore::File::createWithRelativePath):
2729         (WebCore::File::File):
2730         * fileapi/File.h:
2731         (File):
2732         (WebCore::File::create):
2733         (WebCore::File::createWithName):
2734         * html/FileInputType.cpp:
2735         (WebCore::FileInputType::createFileList):
2736         * platform/chromium/ChromiumDataObject.cpp:
2737         (WebCore::ChromiumDataObject::addFilename):
2738         * platform/gtk/ClipboardGtk.cpp:
2739         (WebCore::ClipboardGtk::files):
2740         * platform/mac/ClipboardMac.mm:
2741         (WebCore::ClipboardMac::files):
2742         * platform/qt/ClipboardQt.cpp:
2743         (WebCore::ClipboardQt::files):
2744         * platform/win/ClipboardWin.cpp:
2745         (WebCore::ClipboardWin::files):
2746
2747 2012-07-24  Vsevolod Vlasov  <vsevik@chromium.org>
2748
2749         Web Inspector: Snippets UI polish
2750         https://bugs.webkit.org/show_bug.cgi?id=92142
2751
2752         Reviewed by Pavel Feldman.
2753
2754         Changed snippets context menu items.
2755         Added run snippet status bar button.
2756         Removed unused edit source button.
2757
2758         * English.lproj/localizedStrings.js:
2759         * inspector/front-end/Images/statusbarButtonGlyphs.png:
2760         * inspector/front-end/ScriptSnippetModel.js:
2761         (WebInspector.SnippetJavaScriptSourceFrame):
2762         (WebInspector.SnippetJavaScriptSourceFrame.prototype.statusBarItems):
2763         (WebInspector.SnippetJavaScriptSourceFrame.prototype._runButtonClicked):
2764         * inspector/front-end/ScriptsNavigator.js:
2765         (WebInspector.SnippetsNavigatorView.prototype.getOrCreateFolderTreeElement):
2766         (WebInspector.SnippetsNavigatorView.prototype.handleContextMenu):
2767         * inspector/front-end/ScriptsPanel.js:
2768         (WebInspector.ScriptsPanel.prototype._updateScriptViewStatusBarItems):
2769         (WebInspector.ScriptsPanel.prototype._createSourceFrame):
2770         * inspector/front-end/SourceFrame.js:
2771         (WebInspector.SourceFrame.prototype.statusBarItems):
2772         * inspector/front-end/inspector.css:
2773         * inspector/front-end/scriptsPanel.css:
2774         (.evaluate-snippet-status-bar-item .glyph):
2775         (.evaluate-snippet-status-bar-item.toggled .glyph):
2776
2777 2012-07-24  Nico Weber  <thakis@chromium.org>
2778
2779         [chromium/mac] Remove webcore_resource_files from WebCore.gypi
2780         https://bugs.webkit.org/show_bug.cgi?id=92129
2781
2782         Reviewed by Adam Barth.
2783
2784         It was added in http://trac.webkit.org/changeset/81706/trunk/Source/WebCore/WebCore.gypi .
2785         The changes in that revision were mostly reverted in http://trac.webkit.org/changeset/119921 ,
2786         but this block was forgotten. Since it just confused me for a bit, remove it.
2787
2788         * WebCore.gyp/WebCore.gyp:
2789
2790 2012-07-24  Julien Chaffraix  <jchaffraix@webkit.org>
2791
2792         inline-table wrapper should be generated for display: inline element only
2793         https://bugs.webkit.org/show_bug.cgi?id=92054
2794
2795         Reviewed by Abhishek Arya.
2796
2797         CSS 2.1 only takes into account the display when determining if we should generate
2798         an inline-table. My misreading of the spec would make us generate an inline-table
2799         wrapper for any inline formatting context.
2800
2801         Test: fast/table/inline-block-generates-table-wrapper.html
2802
2803         * rendering/RenderTable.cpp:
2804         (WebCore::RenderTable::createAnonymousWithParentRenderer):
2805         Changed to use display instead of isInline to properly match the spec.
2806
2807 2012-07-24  Alec Flett  <alecflett@chromium.org>
2808
2809         IndexedDB: Temporarily continue generating backend keys for empty key lists
2810         https://bugs.webkit.org/show_bug.cgi?id=92012
2811
2812         Reviewed by Tony Chang.
2813
2814         Temporarily change key behavior to allow chromium in_process_webkit
2815         to call putWithIndexKeys without inadvertently preventing index
2816         key generation. Note this is temporary until frontend key generation
2817         patch lands.
2818
2819         No new tests, this is part of a refactor that doesn't change behavior.
2820
2821         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
2822         (WebCore::IDBObjectStoreBackendImpl::putInternal):
2823
2824 2012-07-24  Pavel Feldman  <pfeldman@chromium.org>
2825
2826         Web Inspector: introduce UISourceCodeFrame.
2827         https://bugs.webkit.org/show_bug.cgi?id=92124
2828
2829         Reviewed by Vsevolod Vlasov.
2830
2831         Generic implementation of SourceFrame over UISourceCode added.
2832
2833         * WebCore.gypi:
2834         * WebCore.vcproj/WebCore.vcproj:
2835         * inspector/compile-front-end.py:
2836         * inspector/front-end/ScriptsPanel.js:
2837         (WebInspector.ScriptsPanel.prototype._createSourceFrame):
2838         * inspector/front-end/StylesPanel.js:
2839         * inspector/front-end/UISourceCodeFrame.js: Added.
2840         (WebInspector.UISourceCodeFrame):
2841         (WebInspector.UISourceCodeFrame.prototype.canEditSource):
2842         (WebInspector.UISourceCodeFrame.prototype.commitEditing):
2843         (WebInspector.UISourceCodeFrame.prototype.afterTextChanged):
2844         (WebInspector.UISourceCodeFrame.prototype._didEditContent):
2845         (WebInspector.UISourceCodeFrame.prototype._onContentChanged):
2846         (WebInspector.UISourceCodeFrame.prototype.populateTextAreaContextMenu):
2847         * inspector/front-end/WebKit.qrc:
2848         * inspector/front-end/inspector.html:
2849
2850 2012-07-24  Dan Bernstein  <mitz@apple.com>
2851
2852         <rdar://problem/11945102> REGRESSION (r109451): Overlay scrollbars always use the default style, regardless of background color
2853         https://bugs.webkit.org/show_bug.cgi?id=92115
2854
2855         Reviewed by Mark Rowe.
2856
2857         * platform/Scrollbar.cpp:
2858         (WebCore::Scrollbar::scrollbarOverlayStyle): Reversed an incorrect null check.
2859
2860 2012-07-24  Andrew Wilson  <atwilson@chromium.org>
2861
2862         Another prospective build fix for Chromium. Unreviewed.
2863
2864         * platform/graphics/harfbuzz/ng/HarfBuzzNGFace.h:
2865
2866 2012-07-24  Andrew Wilson  <atwilson@chromium.org>
2867
2868         Unreviewed prospective build fix for Chromium. Changed include of hb.h in HarfBuzzNGFace.h
2869
2870         * platform/graphics/harfbuzz/ng/HarfBuzzNGFace.h:
2871
2872 2012-07-24  Dominik Röttsches  <dominik.rottsches@intel.com>
2873
2874         HarfBuzzFaceNG.h forward declarations conflict with newer versions of Harfbuzz
2875         https://bugs.webkit.org/show_bug.cgi?id=92103
2876
2877         Reviewed by Philippe Normand.
2878
2879         As preparation for enabling harfbuzz-ng for EFL, I would like to include the header
2880         here since the forward declarations are conflicting with the harfbuzz version
2881         we will use for EFL.
2882
2883         No new tests, no change in behavior.
2884
2885         * platform/graphics/harfbuzz/ng/HarfBuzzNGFace.h:
2886
2887 2012-07-24  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
2888
2889         Fix blend filter for autovectorizing
2890         https://bugs.webkit.org/show_bug.cgi?id=91398
2891
2892         Reviewed by Nikolas Zimmermann.
2893
2894         To support auto-vectorizing, the loop had to be unswitched, and regular arrays used that 
2895         did not do boundary-checks in the inner loop. Finally the integer division by 255
2896         was optimized not use integer division intrinsics.
2897
2898         On a X86-64 architechture using GCC -O3 on the file, this gives a speed-up of 2.9x.
2899
2900         * platform/graphics/filters/FEBlend.cpp:
2901         (WebCore::fastDivideBy255):
2902         (BlendNormal):
2903         (WebCore::BlendNormal::apply):
2904         (BlendMultiply):
2905         (WebCore::BlendMultiply::apply):
2906         (BlendScreen):
2907         (WebCore::BlendScreen::apply):
2908         (BlendDarken):
2909         (WebCore::BlendDarken::apply):
2910         (BlendLighten):
2911         (WebCore::BlendLighten::apply):
2912         (BlendUnknown):
2913         (WebCore::BlendUnknown::apply):
2914         (WebCore::platformApply):
2915         (WebCore::FEBlend::platformApplyGeneric):
2916         (WebCore::FEBlend::platformApplySoftware):
2917         * platform/graphics/filters/FEBlend.h:
2918         (FEBlend):
2919
2920 2012-07-23  Hans Wennborg  <hans@chromium.org>
2921
2922         Speech JavaScript API: Add the SpeechRecognitionResult.emma attribute
2923         https://bugs.webkit.org/show_bug.cgi?id=91743
2924
2925         Reviewed by Adam Barth.
2926
2927         Implement the 'emma' attribute as described in the spec draft at
2928         http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
2929
2930         Test: fast/speech/scripted/emma.html
2931
2932         * Modules/speech/SpeechRecognitionResult.cpp:
2933         (WebCore::SpeechRecognitionResult::~SpeechRecognitionResult):
2934         (WebCore):
2935         (WebCore::SpeechRecognitionResult::emma):
2936         * Modules/speech/SpeechRecognitionResult.h:
2937         (WebCore):
2938         (SpeechRecognitionResult):
2939         * Modules/speech/SpeechRecognitionResult.idl:
2940         * WebCore.gypi:
2941         * bindings/v8/custom/V8SpeechRecognitionResultCustom.cpp:
2942         (WebCore):
2943         (WebCore::V8SpeechRecognitionResult::visitDOMWrapper):
2944           We need to add an implicit reference from the result object to the
2945           emma object to keep the latters DOM tree alive across
2946           garbage-collection.
2947
2948 2012-07-24  Andrei Poenaru  <poenaru@adobe.com>
2949
2950         Web Inspector: Protocol Extension: add getFlowByName command
2951         https://bugs.webkit.org/show_bug.cgi?id=91855
2952
2953         Reviewed by Pavel Feldman.
2954
2955         The "getFlowByName" command should return a NamedFlow for a given document and name.
2956
2957         Test: inspector/styles/protocol-css-regions-commands.html
2958
2959         * inspector/Inspector.json:
2960         * inspector/InspectorCSSAgent.cpp:
2961         (WebCore::InspectorCSSAgent::getFlowByName):
2962         (WebCore):
2963         * inspector/InspectorCSSAgent.h:
2964         (InspectorCSSAgent):
2965         * inspector/front-end/CSSStyleModel.js:
2966         (WebInspector.CSSStyleModel.prototype.getNamedFlowCollectionAsync):
2967         (WebInspector.CSSStyleModel.prototype.getFlowByNameAsync):
2968         (WebInspector.NamedFlow):
2969         (WebInspector.NamedFlow.parsePayload):
2970
2971 2012-07-23  Oswald Buddenhagen  <oswald.buddenhagen@nokia.com>
2972
2973         [Qt] Fix compilation against namespaced Qt
2974
2975         Reviewed by Simon Hausmann.
2976
2977         * platform/graphics/Font.h:
2978         * platform/network/ResourceHandleInternal.h:
2979         * platform/qt/ThirdPartyCookiesQt.h:
2980
2981 2012-07-24  Anthony Scian  <ascian@rim.com>
2982
2983         Web Inspector [JSC]: Enable initiator column in network panel.
2984         https://bugs.webkit.org/show_bug.cgi?id=65533
2985
2986         Reviewed by Vsevolod Vlasov.
2987
2988         With 40118 fixed for webkit, Preferences.displayInitiator should be set to true.
2989         Removed references to it since the optionality is no longer required.
2990
2991         Test: http/tests/inspector/network/network-initiator.html
2992
2993         * inspector/front-end/NetworkPanel.js:
2994         (WebInspector.NetworkLogView.prototype._createTable):
2995         (WebInspector.NetworkLogView.prototype.switchToDetailedView):
2996         (WebInspector.NetworkLogView.prototype.switchToBriefView):
2997         (WebInspector.NetworkDataGridNode.prototype.createCells):
2998         (WebInspector.NetworkDataGridNode.prototype.refreshRequest):
2999         * inspector/front-end/Settings.js:
3000
3001 2012-07-24  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3002
3003         Missing *explicit* keyword in dom and page.
3004         https://bugs.webkit.org/show_bug.cgi?id=92074
3005
3006         Reviewed by Kentaro Hara.
3007
3008         Some constructors missed to use *explicit* keyword. They need to be added
3009         *explicit* keyword to contructor which has a parameter in order to avoid
3010         implicit type conversion.
3011
3012         Some files in dom directory can't use explicit keyword because of build breaks.
3013
3014         No new tests. Covered by existing tests.
3015
3016         * dom/BeforeLoadEvent.h:
3017         (WebCore::BeforeLoadEvent::BeforeLoadEvent):
3018         * dom/BeforeTextInsertedEvent.h:
3019         (BeforeTextInsertedEvent):
3020         * dom/ChildListMutationScope.h:
3021         (WebCore::ChildListMutationScope::ChildListMutationScope):
3022         * dom/ChildNodeList.h:
3023         (ChildNodeList):
3024         * dom/ClientRect.h:
3025         (ClientRect):
3026         * dom/ClientRectList.h:
3027         (ClientRectList):
3028         * dom/ComposedShadowTreeWalker.h:
3029         (ComposedShadowTreeParentWalker):
3030         * dom/DOMCoreException.h:
3031         (WebCore::DOMCoreException::DOMCoreException):
3032         * dom/DOMImplementation.h:
3033         (DOMImplementation):
3034         * dom/DatasetDOMStringMap.h:
3035         (WebCore::DatasetDOMStringMap::DatasetDOMStringMap):
3036         * dom/DeviceMotionController.h:
3037         (DeviceMotionController):
3038         * dom/DeviceOrientationController.h:
3039         (DeviceOrientationController):
3040         * dom/DocumentParser.h:
3041         (DocumentParser):
3042         * dom/EventException.h:
3043         (WebCore::EventException::EventException):
3044         * dom/EventListener.h:
3045         (WebCore::EventListener::EventListener):
3046         * dom/ExceptionBase.h:
3047         (ExceptionBase):
3048         * dom/GenericEventQueue.h:
3049         (GenericEventQueue):
3050         * dom/KeyboardEvent.h:
3051         (WebCore::KeypressCommand::KeypressCommand):
3052         * dom/MemoryInstrumentation.h:
3053         (WebCore::MemoryObjectInfo::MemoryObjectInfo):
3054         * dom/MessageChannel.h:
3055         (MessageChannel):
3056         * dom/MessagePort.h:
3057         (MessagePort):
3058         * dom/MessagePortChannel.h:
3059         (MessagePortChannel):
3060         * dom/MutationObserver.h:
3061         * dom/NamedNodeMap.h:
3062         (WebCore::NamedNodeMap::NamedNodeMap):
3063         * dom/NodeFilter.h:
3064         (WebCore::NodeFilter::NodeFilter):
3065         * dom/NodeWithIndex.h:
3066         (WebCore::NodeWithIndex::NodeWithIndex):
3067         * dom/Range.h:
3068         * dom/RangeException.h:
3069         (WebCore::RangeException::RangeException):
3070         * dom/RawDataDocumentParser.h:
3071         (WebCore::RawDataDocumentParser::RawDataDocumentParser):
3072         * dom/ScriptRunner.h:
3073         (ScriptRunner):
3074         * dom/SelectorQuery.h:
3075         (SelectorQuery):
3076         * dom/ShadowRoot.h:
3077         (ShadowRoot):
3078         * dom/SpaceSplitString.h:
3079         (SpaceSplitStringData):
3080         * dom/StaticHashSetNodeList.h:
3081         (StaticHashSetNodeList):
3082         * dom/StaticNodeList.h:
3083         (WebCore::StaticNodeList::StaticNodeList):
3084         * dom/TransformSource.h:
3085         (TransformSource):
3086         * dom/TreeScope.h:
3087         (TreeScope):
3088         * dom/WebKitNamedFlowCollection.h:
3089         (WebKitNamedFlowCollection):
3090         * page/EventHandler.h:
3091         (EventHandler):
3092         * page/FocusController.h:
3093         (FocusController):
3094         * page/FrameView.h:
3095         (FrameView):
3096         * page/MemoryInfo.h:
3097         (MemoryInfo):
3098         * page/Page.h:
3099         (Page):
3100         * page/PageGroup.h:
3101         (PageGroup):
3102         * page/PrintContext.h:
3103         (PrintContext):
3104         * page/Settings.h:
3105         (Settings):
3106         * page/SpeechInput.h:
3107         (SpeechInput):
3108         * page/SpeechInputResultList.h:
3109         (SpeechInputResultList):
3110         * page/WebKitAnimation.h:
3111         * page/WindowFeatures.h:
3112         (WindowFeatures):
3113         * page/WorkerNavigator.h:
3114         (WorkerNavigator):
3115
3116 2012-07-24  Kent Tamura  <tkent@chromium.org>
3117
3118         Replace some callsites of shadowAncestorNode() with shadowHost()
3119         https://bugs.webkit.org/show_bug.cgi?id=92060
3120
3121         Reviewed by Hajime Morita.
3122
3123         shadowAncestorNode() is deprecated.
3124
3125         No new tests. This shouldn't change behaviors.
3126
3127         * html/shadow/MediaControlElements.cpp:
3128         (WebCore::toParentMediaElement):
3129         * html/shadow/TextControlInnerElements.h:
3130         (WebCore::SpinButtonElement::isEnabledFormControl):
3131         (WebCore::SpinButtonElement::isReadOnlyFormControl):
3132         * platform/efl/RenderThemeEfl.cpp:
3133         (WebCore::RenderThemeEfl::paintMediaFullscreenButton):
3134         (WebCore::RenderThemeEfl::paintMediaMuteButton):
3135         * platform/gtk/RenderThemeGtk.cpp:
3136         (WebCore::getMediaElementFromRenderObject):
3137         (WebCore::centerRectVerticallyInParentInputElement):
3138         * platform/qt/RenderThemeQt.cpp:
3139         (WebCore::RenderThemeQt::paintSearchFieldCancelButton):
3140         (WebCore::RenderThemeQt::paintMediaSliderThumb):
3141         Removed an ASSERT() because nullness of o->node() is already asserted.
3142         * rendering/RenderInputSpeech.cpp:
3143         (WebCore::RenderInputSpeech::paintInputFieldSpeechButton):
3144         * rendering/RenderMediaControlsChromium.cpp:
3145         (WebCore::paintMediaSliderThumb):
3146         Passing shadowHost() to toParentMediaElement(), which accepts 0 and will return 0.
3147         (WebCore::paintMediaVolumeSliderThumb): ditto.
3148         * rendering/RenderThemeChromiumSkia.cpp:
3149         (WebCore::RenderThemeChromiumSkia::paintSearchFieldCancelButton):
3150         (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsDecoration):
3151         (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsButton):
3152         * rendering/RenderThemeMac.mm:
3153         (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
3154         Remove an ASSERT(input) because input never be null unless o->node() is
3155         null. If o->node() is null, this function crashes.
3156         (WebCore::RenderThemeMac::paintSearchFieldResultsDecoration):
3157         (WebCore::RenderThemeMac::paintSearchFieldResultsButton):
3158         (WebCore::RenderThemeMac::paintMediaMuteButton):
3159         It's ok to ignore "node is a media element" case because this function
3160         works only if node->isMediaControlElement().
3161         (WebCore::RenderThemeMac::paintMediaPlayButton): ditto.
3162         (WebCore::RenderThemeMac::paintMediaSliderTrack): ditto.
3163         * rendering/RenderThemeSafari.cpp:
3164         (WebCore::RenderThemeSafari::paintSearchFieldCancelButton):
3165         Remove an ASSERT(input) because input never be null unless o->node() is
3166         null. If o->node() is null, this function crashes.
3167         (WebCore::RenderThemeSafari::paintSearchFieldResultsDecoration): ditto.
3168         (WebCore::RenderThemeSafari::paintSearchFieldResultsButton): ditto.
3169         * rendering/RenderThemeWinCE.cpp:
3170         (WebCore::mediaElementParent):
3171
3172 2012-07-24  Peter Beverloo  <peter@chromium.org>
3173
3174         [Chromium] Build fix for Android after r123424
3175         https://bugs.webkit.org/show_bug.cgi?id=92082
3176
3177         Unreviewed build fix.
3178
3179         Mark removed the PlatformSupport.h header from ScrollbarThemeChromiumAndroid.cpp
3180         in r123424, while there still are two references left to another method and a
3181         constant. Re-add the include directive.
3182
3183         * platform/chromium/ScrollbarThemeChromiumAndroid.cpp:
3184
3185 2012-07-24  Kentaro Hara  <haraken@chromium.org>
3186
3187         [JSC] REGRESSION(r122912): CodeGeneratorJS.pm generates wrong code
3188         for static attributes in supplemental IDL files
3189         https://bugs.webkit.org/show_bug.cgi?id=91925
3190
3191         Reviewed by Adam Barth.
3192
3193         r122912 implemented static attributes in CodeGeneratorJS.pm.
3194         However, it generates wrong code for static attributes in supplemental
3195         IDL files. This patch fixes it as shown in JSTestInterface.cpp.
3196         This fix aligns with the fix in CodeGeneratorV8.pm (r123308).
3197
3198         Test: bindings/scripts/test/TestSupplemental.idl
3199
3200         * bindings/scripts/CodeGeneratorJS.pm:
3201         (GenerateImplementation):
3202         * bindings/scripts/test/JS/JSTestInterface.cpp:
3203         (WebCore::jsTestInterfaceConstructorSupplementalStaticReadOnlyAttr):
3204         (WebCore::jsTestInterfaceConstructorSupplementalStaticAttr):
3205         (WebCore::setJSTestInterfaceConstructorSupplementalStaticAttr):
3206
3207 2012-07-24  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3208
3209         Add *explicit* keyword to constructor which has a parameter in bridge, history, loader and plugins.
3210         https://bugs.webkit.org/show_bug.cgi?id=92064
3211
3212         Reviewed by Kentaro Hara.
3213
3214         Some constructors missed to use *explicit* keyword. They need to be added
3215         *explicit* keyword to contructor which has a parameter in order to avoid
3216         implicit type conversion.
3217
3218         No new tests. Covered by existing tests.
3219
3220         * bridge/IdentifierRep.h:
3221         (WebCore::IdentifierRep::IdentifierRep):
3222         * history/BackForwardListImpl.h:
3223         (BackForwardListImpl):
3224         * history/CachedFrame.h:
3225         (CachedFrame):
3226         * history/HistoryItem.h:
3227         (HistoryItem):
3228         * loader/DocumentWriter.h:
3229         (DocumentWriter):
3230         * loader/FrameNetworkingContext.h:
3231         (WebCore::FrameNetworkingContext::FrameNetworkingContext):
3232         * loader/HistoryController.h:
3233         * loader/ImageLoader.h:
3234         (ImageLoader):
3235         * loader/LinkLoader.h:
3236         (LinkLoader):
3237         * loader/MainResourceLoader.h:
3238         (MainResourceLoader):
3239         * loader/NavigationAction.h:
3240         (NavigationAction):
3241         * loader/NavigationScheduler.h:
3242         (NavigationScheduler):
3243         * loader/PolicyChecker.h:
3244         (PolicyChecker):
3245         * loader/SubframeLoader.h:
3246         (SubframeLoader):
3247         * loader/ThreadableLoaderClientWrapper.h:
3248         (WebCore::ThreadableLoaderClientWrapper::ThreadableLoaderClientWrapper):
3249         * plugins/PluginData.h:
3250         (PluginData):
3251         * plugins/PluginViewBase.h:
3252         (WebCore::PluginViewBase::PluginViewBase):
3253
3254 2012-07-24  Patrick Gansterer  <paroga@webkit.org>
3255
3256         [Qt] Fix conversion from GregorianDateTime to QTime
3257         https://bugs.webkit.org/show_bug.cgi?id=92068
3258
3259         Reviewed by Simon Hausmann.
3260
3261         * bridge/qt/qt_runtime.cpp:
3262         (JSC::Bindings::convertValueToQVariant):
3263         * bridge/qt/qt_runtime_qt4.cpp:
3264         (JSC::Bindings::convertValueToQVariant):
3265
3266 2012-07-24  Arko Saha  <arko@motorola.com>
3267
3268         Microdata: Implement PropertyNodeList interface.
3269         https://bugs.webkit.org/show_bug.cgi?id=80269
3270
3271         Reviewed by Ryosuke Niwa.
3272
3273         Added support for PropertyNodeList interface. Currently HTMLPropertiesCollection.namedItem(name)
3274         returns NodeList object. Made changes so that it will return PropertyNodeList object.
3275
3276         Implemented propertyNodeList.getValues() method. It returns an array of various values. Its
3277         values are obtained from the "itemValue" DOM property of each of the elements represented by
3278         the object, in tree order.
3279
3280         Spec: http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#propertynodelist
3281
3282         Tests: fast/dom/MicroData/nameditem-returns-propertynodelist.html
3283                fast/dom/MicroData/propertynodelist-getvalues-array-values-obtained-from-itemvalue-of-each-element.html
3284                fast/dom/MicroData/propertynodelist-getvalues-test.html
3285                fast/dom/MicroData/propertynodelist-test-add-remove-element.html
3286
3287         * CMakeLists.txt:
3288         * DerivedSources.cpp:
3289         * DerivedSources.make:
3290         * DerivedSources.pri:
3291         * GNUmakefile.list.am:
3292         * Target.pri:
3293         * UseJSC.cmake:
3294         * UseV8.cmake:
3295         * WebCore.gypi:
3296         * WebCore.vcproj/WebCore.vcproj:
3297         * WebCore.xcodeproj/project.pbxproj:
3298         * bindings/gobject/GNUmakefile.am:
3299         * bindings/js/JSBindingsAllInOne.cpp:
3300         * bindings/js/JSMicroDataItemValueCustom.cpp: Added.
3301         (WebCore):
3302         (WebCore::toJS): Added toJS() custom method. Returns Node if itemValue is node else returns String.
3303         * bindings/v8/custom/V8MicroDataItemValueCustom.cpp: Added.
3304         (WebCore):
3305         (WebCore::toV8): Added toV8 custom code.
3306         * dom/DynamicNodeList.cpp:
3307         (WebCore::DynamicNodeListCacheBase::rootNode): Return document if owner node has itemref attribute specified.
3308         (WebCore):
3309         (WebCore::DynamicNodeListCacheBase::ownerNodeHasItemRefAttribute): Returns true if owner node has itemref attribute
3310         specified with root type NodeListRootedAtDocumentIfOwnerHasItemrefAttr.
3311         (WebCore::DynamicNodeListCacheBase::invalidateCache):
3312         (WebCore::DynamicNodeList::itemWithName): Update itemrefElements cache if root type is
3313         NodeListIsRootedAtDocumentIfOwnerHasItemrefAttr.
3314         * dom/DynamicNodeList.h: Added m_hasItemRefElements in DynamicNodeListCacheBase to check if itemRefElmenets cache
3315         is valid.
3316         (WebCore::DynamicNodeListCacheBase::DynamicNodeListCacheBase):
3317         (WebCore::DynamicNodeListCacheBase::isRootedAtDocument):
3318         (DynamicNodeListCacheBase):
3319         (WebCore::DynamicNodeListCacheBase::isItemRefElementsCacheValid):
3320         (WebCore::DynamicNodeListCacheBase::setItemRefElementsCacheValid):
3321         (WebCore::DynamicNodeListCacheBase::rootType): Returns cached root type.
3322         (WebCore::DynamicNodeListCacheBase::shouldInvalidateTypeOnAttributeChange): Invalidate NodeListCache on itemref
3323         attribute change.
3324         * dom/Node.cpp:
3325         (WebCore::Node::propertyNodeList):
3326         * dom/Node.h:
3327         (WebCore):
3328         (Node):
3329         * dom/PropertyNodeList.cpp: Added.
3330         (WebCore):
3331         (WebCore::PropertyNodeList::PropertyNodeList):
3332         (WebCore::PropertyNodeList::~PropertyNodeList):
3333         (WebCore::PropertyNodeList::elementIsPropertyOfRefElement): Checks if the testElement is a property of Microdata
3334         item.
3335         (WebCore::PropertyNodeList::updateRefElements):
3336         (WebCore::PropertyNodeList::nodeMatches):
3337         (WebCore::PropertyNodeList::getValues): Returns PropertyValueArray whose values are obtained from the
3338         itemValue DOM property of each of the elements represented by the object, in tree order.
3339         * dom/PropertyNodeList.h: Added.
3340         (WebCore):
3341         (PropertyNodeList):
3342         (WebCore::PropertyNodeList::create):
3343         * dom/PropertyNodeList.idl: Added.
3344         * html/HTMLCollection.cpp:
3345         (WebCore::DynamicNodeListCacheBase::itemCommon): Update itemrefElements cache if its a NodeListCollectionType with
3346         root type NodeListIsRootedAtDocumentIfOwnerHasItemrefAttr.
3347         * html/HTMLElement.cpp:
3348         (WebCore::HTMLElement::properties):
3349         (WebCore):
3350         (WebCore::HTMLElement::getItemRefElements): Returns the ItemRefElements list of given element. Added this
3351         method to share the code between HTMLPropertiesCollection and PropertyNodeList to update itemRefElements.
3352         * html/HTMLElement.h:
3353         (HTMLElement):
3354         * html/HTMLPropertiesCollection.cpp:
3355         (WebCore::HTMLPropertiesCollection::HTMLPropertiesCollection):
3356         (WebCore::HTMLPropertiesCollection::updateRefElements):
3357         (WebCore::HTMLPropertiesCollection::updateNameCache):
3358         (WebCore::HTMLPropertiesCollection::namedItem): Return PropertyNodeList object instead of NodeList.
3359         (WebCore::HTMLPropertiesCollection::hasNamedItem): Return true if it finds an item with given
3360         name in the properties collection.
3361         * html/HTMLPropertiesCollection.h: Removed m_hasItemRefElements member variable, now DynamicNodeListCacheBase
3362         has isItemRefElementsCacheValid. Also removed m_hasPropertyNameCache, as DynamicNodeListCacheBase already has
3363         hasNameCache() and setHasNameCache().
3364         (WebCore):
3365         (HTMLPropertiesCollection):
3366         (WebCore::HTMLPropertiesCollection::invalidateCache):
3367         (WebCore::HTMLPropertiesCollection::updatePropertyCache):
3368         * html/HTMLPropertiesCollection.idl:
3369         * html/MicroDataItemValue.idl: Added.
3370         * page/DOMWindow.idl:
3371
3372 2012-07-24  Kentaro Hara  <haraken@chromium.org>
3373
3374         [JSC] REGRESSION(r122912): CodeGeneratorJS.pm should not
3375         implicitly assume ScriptExecutionContext for static attributes
3376         https://bugs.webkit.org/show_bug.cgi?id=91924
3377
3378         Reviewed by Adam Barth.
3379
3380         r122912 implemented static attributes in CodeGeneratorJS.pm.
3381         However, the generated code assumes that static attributes
3382         always require ScriptExecutionContext, which is wrong.
3383         If we need a ScriptExecutionContext, we should specify
3384         [CallWith=ScriptExecutionContext].
3385
3386         This patch fixes CodeGeneratorJS.pm so that static attributes
3387         do not assume ScriptExecutionContext. This fix aligns with
3388         the fix in CodeGeneratorV8.pm in r123308.
3389
3390         Test: bindings/scripts/test/TestObj.idl
3391
3392         * bindings/scripts/CodeGeneratorJS.pm:
3393         (GenerateImplementation):
3394         * bindings/scripts/test/JS/JSTestInterface.cpp:
3395         (WebCore::jsTestInterfaceConstructorSupplementalStaticReadOnlyAttr):
3396         (WebCore::jsTestInterfaceConstructorSupplementalStaticAttr):
3397         (WebCore::setJSTestInterfaceConstructorSupplementalStaticAttr):
3398         * bindings/scripts/test/JS/JSTestObj.cpp:
3399         (WebCore::jsTestObjConstructorStaticReadOnlyIntAttr):
3400         (WebCore::jsTestObjConstructorStaticStringAttr):
3401         (WebCore::setJSTestObjConstructorStaticStringAttr):
3402
3403 2012-07-23  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3404
3405         Missing *explicit* keyword in editing.
3406         https://bugs.webkit.org/show_bug.cgi?id=92055
3407
3408         Reviewed by Ryosuke Niwa.
3409
3410         Some constructors missed to use *explicit* keyword. They need to be added
3411         *explicit* keyword to contructor which has a parameter in order to avoid
3412         implicit type conversion.
3413
3414         No new tests. Covered by existing tests.
3415
3416         * editing/AlternativeTextController.h:
3417         (WebCore::AlternativeTextController::UNLESS_ENABLED):
3418         * editing/BreakBlockquoteCommand.h:
3419         (BreakBlockquoteCommand):
3420         * editing/DeleteButton.h:
3421         (DeleteButton):
3422         * editing/DeleteButtonController.h:
3423         (DeleteButtonController):
3424         * editing/EditCommand.h:
3425         (EditCommand):
3426         (WebCore::SimpleEditCommand::SimpleEditCommand):
3427         * editing/EditingBehavior.h:
3428         (WebCore::EditingBehavior::EditingBehavior):
3429         * editing/EditingStyle.h:
3430         (EditingStyle):
3431         * editing/Editor.h:
3432         (Editor):
3433         * editing/FrameSelection.h:
3434         (FrameSelection):
3435         * editing/InsertLineBreakCommand.h:
3436         (InsertLineBreakCommand):
3437         * editing/ModifySelectionListLevel.h:
3438         (ModifySelectionListLevelCommand):
3439         (DecreaseSelectionListLevelCommand):
3440         * editing/RemoveFormatCommand.h:
3441         (RemoveFormatCommand):
3442         * editing/RemoveNodeCommand.h:
3443         (RemoveNodeCommand):
3444         * editing/RemoveNodePreservingChildrenCommand.h:
3445         (RemoveNodePreservingChildrenCommand):
3446         * editing/ReplaceNodeWithSpanCommand.h:
3447         (ReplaceNodeWithSpanCommand):
3448         * editing/TextInsertionBaseCommand.h:
3449         (TextInsertionBaseCommand):
3450         * editing/UndoManager.h:
3451         (UndoManager):
3452         * editing/UnlinkCommand.h:
3453         (UnlinkCommand):
3454         * editing/WrapContentsInDummySpanCommand.h:
3455         (WrapContentsInDummySpanCommand):
3456
3457 2012-07-23  Dominic Mazzoni  <dmazzoni@google.com>
3458
3459         AX: Need AccessibilityObjects for nodes without renderers in canvas subtree
3460         https://bugs.webkit.org/show_bug.cgi?id=87899
3461
3462         Reviewed by Chris Fleizach.
3463
3464         Refactors AccessibilityRenderObject so that it inherits from a new class,
3465         AccessibilityNodeObject, that can be constructed from a Node without a
3466         renderer. Modifies AXObjectCache so that it automatically creates an
3467         AccessibilityNodeObject for elements in a canvas subtree but not otherwise.
3468         A new layout test verifies that this correctly exposes an accessibility
3469         tree with appropriate roles for elements in a canvas subtree.
3470
3471         This patch does not try to complete the implementation of
3472         AccessibilityNodeObject. Most AX methods are still unimplemented and need
3473         to be migrated from AccessibilityRenderObject to AccessibilityNodeObject
3474         in a future patch.
3475         
3476         This patch also doesn't change anything outside of WebCore/accessibility, so
3477         the rest of WebCore only calls AXObjectCache when there are changes to a
3478         RenderObject, not to a Node. Accessible notifications on nodes without
3479         renderers need to be implemented in a future patch.
3480
3481         Test: accessibility/canvas-accessibilitynodeobject.html
3482
3483         * CMakeLists.txt:
3484         * GNUmakefile.list.am:
3485         * Target.pri:
3486         * WebCore.gypi:
3487         * accessibility/AXObjectCache.cpp:
3488         (WebCore::AXObjectCache::get):
3489         (WebCore):
3490         (WebCore::createFromNode):
3491         (WebCore::AXObjectCache::getOrCreate):
3492         (WebCore::AXObjectCache::remove):
3493         * accessibility/AXObjectCache.h:
3494         (AXObjectCache):
3495         (WebCore::AXObjectCache::get):
3496         (WebCore::AXObjectCache::getOrCreate):
3497         (WebCore::AXObjectCache::remove):
3498         * accessibility/AccessibilityARIAGrid.cpp:
3499         (WebCore::AccessibilityARIAGrid::AccessibilityARIAGrid):
3500         (WebCore):
3501         (WebCore::AccessibilityARIAGrid::~AccessibilityARIAGrid):
3502         (WebCore::AccessibilityARIAGrid::init):
3503         (WebCore::AccessibilityARIAGrid::create):
3504         * accessibility/AccessibilityARIAGrid.h:
3505         (AccessibilityARIAGrid):
3506         * accessibility/AccessibilityARIAGridCell.cpp:
3507         (WebCore::AccessibilityARIAGridCell::create):
3508         * accessibility/AccessibilityARIAGridRow.cpp:
3509         (WebCore::AccessibilityARIAGridRow::create):
3510         * accessibility/AccessibilityAllInOne.cpp:
3511         * accessibility/AccessibilityList.cpp:
3512         (WebCore::AccessibilityList::create):
3513         * accessibility/AccessibilityListBox.cpp:
3514         (WebCore::AccessibilityListBox::create):
3515         * accessibility/AccessibilityMediaControls.cpp:
3516         (WebCore::AccessibilityMediaControl::create):
3517         (WebCore::AccessibilityMediaControlsContainer::create):
3518         (WebCore::AccessibilityMediaTimeline::create):
3519         (WebCore::AccessibilityMediaTimeDisplay::create):
3520         * accessibility/AccessibilityMenuList.cpp:
3521         (WebCore::AccessibilityMenuList::create):
3522         (WebCore):
3523         * accessibility/AccessibilityMenuList.h:
3524         (AccessibilityMenuList):
3525         * accessibility/AccessibilityNodeObject.cpp: Added.
3526         (WebCore):
3527         (WebCore::AccessibilityNodeObject::AccessibilityNodeObject):
3528         (WebCore::AccessibilityNodeObject::~AccessibilityNodeObject):
3529         (WebCore::AccessibilityNodeObject::init):
3530         (WebCore::AccessibilityNodeObject::create):
3531         (WebCore::AccessibilityNodeObject::detach):
3532         (WebCore::AccessibilityNodeObject::childrenChanged):
3533         (WebCore::AccessibilityNodeObject::updateAccessibilityRole):
3534         (WebCore::AccessibilityNodeObject::firstChild):
3535         (WebCore::AccessibilityNodeObject::lastChild):
3536         (WebCore::AccessibilityNodeObject::previousSibling):
3537         (WebCore::AccessibilityNodeObject::nextSibling):
3538         (WebCore::AccessibilityNodeObject::parentObjectIfExists):
3539         (WebCore::AccessibilityNodeObject::parentObject):
3540         (WebCore::AccessibilityNodeObject::elementRect):
3541         (WebCore::AccessibilityNodeObject::setNode):
3542         (WebCore::AccessibilityNodeObject::document):
3543         (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
3544         (WebCore::AccessibilityNodeObject::addChildren):
3545         (WebCore::AccessibilityNodeObject::accessibilityIsIgnored):
3546         (WebCore::AccessibilityNodeObject::canSetFocusAttribute):
3547         (WebCore::AccessibilityNodeObject::determineAriaRoleAttribute):
3548         (WebCore::AccessibilityNodeObject::ariaRoleAttribute):
3549         (WebCore::AccessibilityNodeObject::remapAriaRoleDueToParent):
3550         * accessibility/AccessibilityNodeObject.h: Added.
3551         (WebCore):
3552         (AccessibilityNodeObject):
3553         (WebCore::AccessibilityNodeObject::isAccessibilityNodeObject):
3554         (WebCore::AccessibilityNodeObject::node):
3555         (WebCore::AccessibilityNodeObject::isDetached):
3556         (WebCore::toAccessibilityNodeObject):
3557         * accessibility/AccessibilityObject.h:
3558         (WebCore::AccessibilityObject::isAccessibilityNodeObject):
3559         * accessibility/AccessibilityProgressIndicator.cpp:
3560         (WebCore::AccessibilityProgressIndicator::create):
3561         * accessibility/AccessibilityRenderObject.cpp:
3562         (WebCore::AccessibilityRenderObject::AccessibilityRenderObject):
3563         (WebCore::AccessibilityRenderObject::init):
3564         (WebCore):
3565         (WebCore::AccessibilityRenderObject::create):
3566         (WebCore::AccessibilityRenderObject::detach):
3567         (WebCore::AccessibilityRenderObject::setRenderer):
3568         (WebCore::AccessibilityRenderObject::canHaveChildren):
3569         (WebCore::AccessibilityRenderObject::addCanvasChildren):
3570         (WebCore::AccessibilityRenderObject::addChildren):
3571         * accessibility/AccessibilityRenderObject.h:
3572         (AccessibilityRenderObject):
3573         * accessibility/AccessibilitySlider.cpp:
3574         (WebCore::AccessibilitySlider::create):
3575         * accessibility/AccessibilityTable.cpp:
3576         (WebCore::AccessibilityTable::AccessibilityTable):
3577         (WebCore):
3578         (WebCore::AccessibilityTable::~AccessibilityTable):
3579         (WebCore::AccessibilityTable::init):
3580         (WebCore::AccessibilityTable::create):
3581         * accessibility/AccessibilityTable.h:
3582         (AccessibilityTable):
3583         * accessibility/AccessibilityTableCell.cpp:
3584         (WebCore::AccessibilityTableCell::create):
3585         * accessibility/AccessibilityTableRow.cpp:
3586         (WebCore::AccessibilityTableRow::create):
3587
3588 2012-07-23  David Barr  <davidbarr@chromium.org>
3589
3590         Fix ENABLE_CSS_IMAGE_ORIENTATION compile flag
3591         https://bugs.webkit.org/show_bug.cgi?id=91961
3592
3593         Reviewed by Tony Chang.
3594
3595         https://bugs.webkit.org/show_bug.cgi?id=89055
3596         A rule was missed implementing the ENABLE_CSS_IMAGE_ORIENTATION compile flag.
3597
3598         https://bugs.webkit.org/show_bug.cgi?id=90046
3599         Half of the missing rule was inadvertently added together with ENABLE_CSS_STICKY_POSITION.
3600
3601         No new tests; build configuration fix.
3602
3603         * Configurations/FeatureDefines.xcconfig:
3604
3605 2012-07-23  Douglas Stockwell  <dstockwell@chromium.org>
3606
3607         Null-pointer crash when a derived color like -webkit-activelink is set in a gradient stop
3608         https://bugs.webkit.org/show_bug.cgi?id=89148
3609
3610         Reviewed by Simon Fraser.
3611
3612         CSSGradientValue attempted to resolve colors during paint, this crashed
3613         when a derived color like -webkit-activelink was encountered because the
3614         corresponding element was no longer available in the StyleResolver.
3615         Instead, by adding a field to CSSGradientColorStop we can resolve and
3616         then cache the resolved colors at the correct time. To avoid sharing
3617         cached derived colors between elements we clone the gradient values when
3618         needed.
3619
3620         Test: fast/css/crash-on-gradient-with-derived-color.html
3621
3622         * css/CSSGradientValue.cpp:
3623         (WebCore::CSSGradientValue::gradientWithStylesResolved): Added. Resolve and cache
3624         resolved colors, clone if colors are derived from the element.
3625         (WebCore):
3626         (WebCore::CSSGradientValue::addStops):
3627         (WebCore::CSSGradientValue::isCacheable): Defer to new logic in
3628         StyleResolver.
3629         * css/CSSGradientValue.h:
3630         (CSSGradientColorStop): Added cache of resolved color.
3631         (CSSGradientValue):
3632         (CSSLinearGradientValue):
3633         (CSSRadialGradientValue):
3634         * css/CSSImageGeneratorValue.h:
3635         (WebCore):
3636         * css/CSSValue.h:
3637         (WebCore::CSSValue::isGradientValue):
3638         * css/StyleResolver.cpp:
3639         (WebCore::StyleResolver::collectMatchingRulesForList):
3640         * css/StyleResolver.h:
3641         (StyleResolver):
3642         * rendering/style/StyleGeneratedImage.cpp:
3643         (WebCore::StyleGeneratedImage::image): Revert change from r96449. This
3644         is no longer necessary as the gradient colors are now resolved at a
3645         time when the style is set on StyleResolver.
3646
3647 2012-07-23  Patrick Gansterer  <paroga@webkit.org>
3648
3649         Move GregorianDateTime from JSC to WTF namespace
3650         https://bugs.webkit.org/show_bug.cgi?id=91948
3651
3652         Reviewed by Geoffrey Garen.
3653
3654         Moving GregorianDateTime into the WTF namespace allows us to us to
3655         use it in WebCore too. The new class has the same behaviour as the
3656         old struct. Only the unused timeZone member has been removed.
3657
3658         * bridge/qt/qt_runtime.cpp:
3659         (JSC::Bindings::convertValueToQVariant):
3660         (JSC::Bindings::convertQVariantToValue):
3661         * bridge/qt/qt_runtime_qt4.cpp:
3662         (JSC::Bindings::convertValueToQVariant):
3663         (JSC::Bindings::convertQVariantToValue):
3664
3665 2012-07-23  Mark Pilgrim  <pilgrim@chromium.org>
3666
3667         [Chromium] Move layoutTestMode to WebCore
3668         https://bugs.webkit.org/show_bug.cgi?id=92010
3669
3670         Reviewed by Adam Barth.
3671
3672         Part of a refactoring series. See tracking bug 82948.
3673
3674         * CMakeLists.txt:
3675         * GNUmakefile.list.am:
3676         * Target.pri:
3677         * WebCore.gypi:
3678         * WebCore.vcproj/WebCore.vcproj:
3679         * WebCore.xcodeproj/project.pbxproj:
3680         * bindings/generic/RuntimeEnabledFeatures.h:
3681         (RuntimeEnabledFeatures):
3682         * platform/LayoutTestSupport.cpp: Added.
3683         (WebCore):
3684         (WebCore::isRunningLayoutTest):
3685         (WebCore::setIsRunningLayoutTest):
3686         * platform/LayoutTestSupport.h: Added.
3687         (WebCore):
3688         * platform/chromium/PlatformSupport.h:
3689         (PlatformSupport):
3690         * platform/chromium/ScrollbarThemeChromiumAndroid.cpp:
3691         (WebCore::ScrollbarThemeChromiumAndroid::scrollbarThickness):
3692         (WebCore::ScrollbarThemeChromiumAndroid::paintScrollbarBackground):
3693         * platform/chromium/ScrollbarThemeChromiumWin.cpp:
3694         (WebCore::ScrollbarThemeChromiumWin::scrollbarThickness):
3695         (WebCore::ScrollbarThemeChromiumWin::buttonSize):
3696         * platform/graphics/chromium/FontCacheChromiumWin.cpp:
3697         (WebCore):
3698         (WebCore::LookupAltName):
3699         (WebCore::fontContainsCharacter):
3700         (WebCore::FillLogFont):
3701         (WebCore::FontCache::getFontDataForCharacters):
3702         (WebCore::FontCache::createFontPlatformData):
3703         * platform/graphics/skia/FontCustomPlatformData.cpp:
3704         (WebCore::FontCustomPlatformData::fontPlatformData):
3705         * platform/graphics/skia/FontSkia.cpp:
3706         (WebCore::Font::drawGlyphs):
3707         * rendering/RenderThemeChromiumAndroid.cpp:
3708         (WebCore::RenderThemeChromiumAndroid::systemColor):
3709         (WebCore::RenderThemeChromiumAndroid::adjustInnerSpinButtonStyle):
3710         * rendering/RenderThemeChromiumMac.mm:
3711         (WebCore::RenderThemeChromiumMac::usesTestModeFocusRingColor):
3712         * rendering/RenderThemeChromiumSkia.cpp:
3713         (WebCore::RenderThemeChromiumSkia::caretBlinkInterval):
3714         * rendering/RenderThemeChromiumWin.cpp:
3715         (WebCore):
3716         (WebCore::RenderThemeChromiumWin::platformActiveSelectionBackgroundColor):
3717         (WebCore::RenderThemeChromiumWin::platformInactiveSelectionBackgroundColor):
3718         (WebCore::RenderThemeChromiumWin::platformActiveSelectionForegroundColor):
3719         (WebCore::RenderThemeChromiumWin::systemColor):
3720         (WebCore::menuListButtonWidth):
3721         (WebCore::RenderThemeChromiumWin::determineClassicState):
3722
3723 2012-07-23  Dave Tu  <dtu@chromium.org>
3724
3725         [chromium] Add droppedFrameCount to renderingStats.
3726         https://bugs.webkit.org/show_bug.cgi?id=91694
3727
3728         Reviewed by Adrienne Walker.
3729
3730         * platform/graphics/chromium/cc/CCFrameRateCounter.cpp:
3731         (WebCore):
3732         (WebCore::CCFrameRateCounter::frameInterval):
3733         (WebCore::CCFrameRateCounter::frameIndex):
3734         (WebCore::CCFrameRateCounter::CCFrameRateCounter):
3735         (WebCore::CCFrameRateCounter::markBeginningOfFrame):
3736         (WebCore::CCFrameRateCounter::isBadFrame):
3737         * platform/graphics/chromium/cc/CCFrameRateCounter.h:
3738         (WebCore::CCFrameRateCounter::droppedFrameCount):
3739         (CCFrameRateCounter):
3740         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
3741         (WebCore::CCLayerTreeHost::renderingStats):
3742         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3743         (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
3744         (WebCore::CCLayerTreeHostImpl::drawLayers):
3745         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
3746         (CCLayerTreeHostImpl):
3747         * platform/graphics/chromium/cc/CCRenderingStats.h:
3748         (CCRenderingStats):
3749         (WebCore::CCRenderingStats::CCRenderingStats):
3750         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
3751         (WebCore::CCSingleThreadProxy::implSideRenderingStats):
3752         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
3753         (WebCore::CCThreadProxy::implSideRenderingStatsOnImplThread):
3754
3755 2012-07-23  Dan Bernstein  <mitz@apple.com>
3756
3757         Fixed the build after r123418.
3758
3759         * WebCore.exp.in: Added DocumentMarkerController::addTextMatchMarker.
3760
3761 2012-07-23  Mike Lawther  <mikelawther@chromium.org>
3762
3763         CSS3 calc: optimise blending expression
3764         https://bugs.webkit.org/show_bug.cgi?id=90037
3765
3766         Reviewed by Tony Chang.
3767
3768         Introduce a new calc expression node - a BlendLength node. Given two Lengths and a progress
3769         this blends them together when evaluated.
3770
3771         An alternative and more general approach of being able to blend two CalcExpressionNodes was
3772         tested, but involves more memory allocations, was measurably slower, and nothing currently
3773         would make use of the generality. 
3774
3775         No functional change. Covered by existing tests.
3776
3777         * platform/CalculationValue.h:
3778         (CalcExpressionBlendLength):
3779         (WebCore::CalcExpressionBlendLength::CalcExpressionBlendLength):
3780         (WebCore::CalcExpressionBlendLength::operator==):
3781         (WebCore::CalcExpressionBlendLength::evaluate):
3782         (WebCore):
3783         * platform/Length.cpp:
3784         (WebCore::Length::blendCalculation):
3785
3786 2012-07-23  Nico Weber  <thakis@chromium.org>
3787
3788         [chromium] Show search tickmarks on css-styled scrollbars
3789         https://bugs.webkit.org/show_bug.cgi?id=91949
3790
3791         Reviewed by Adrienne Walker.
3792
3793         This is done by letting RenderScrollbarTheme::paintTickmarks()
3794         delegate to the native ScrollbarTheme. To make this possible,
3795         move paintTickmarks() from ScrollbarThemeComposite to the
3796         superclass ScrollbarTheme.
3797
3798         For testing, add internals.addTextMatchMarker() and add a pixel test.
3799
3800         * platform/ScrollbarTheme.h:
3801         (WebCore::ScrollbarTheme::paintTickmarks):
3802         Moved paintTickmarks() from ScrollbarThemeComposite to here.
3803         * platform/ScrollbarThemeComposite.h:
3804         Remove paintTickmarks().
3805         * platform/chromium/ScrollbarThemeChromium.cpp:
3806         (WebCore::ScrollbarThemeChromium::paintTickmarks):
3807         Switch to drawing tickmarks as vectors, so they can be arbitrarily wide.
3808         * platform/chromium/ScrollbarThemeChromiumMac.h:
3809         (ScrollbarThemeChromiumMac):
3810         Implement paintTickmarks(), so that css-styled scrollbars get tickmarks on mac.
3811         * platform/chromium/ScrollbarThemeChromiumMac.mm:
3812         (WebCore::ScrollbarThemeChromiumMac::paint):
3813         (WebCore::ScrollbarThemeChromiumMac::paintTickmarks):
3814         Implement paintTickmarks(), so that css-styled scrollbars get tickmarks on mac.
3815         * rendering/RenderScrollbarTheme.cpp:
3816         (WebCore::RenderScrollbarTheme::paintTickmarks):
3817         Delegate to the native ScrollbarTheme for tickmark drawing.
3818         (WebCore):
3819         * rendering/RenderScrollbarTheme.h:
3820         (RenderScrollbarTheme):
3821         Override paintTickmarks().
3822
3823 2012-07-23  Brian Anderson  <brianderson@chromium.org>
3824
3825         [chromium] Use shallow flushes that don't glFlush
3826         https://bugs.webkit.org/show_bug.cgi?id=90325
3827
3828         Reviewed by Kenneth Russell.
3829
3830         Adds plumbing for the shallowFlushCHROMIUM extension and uses
3831         shallow flushes instead of normal flushes when uploading textures.
3832         Shallow flushes allow us to initiate command buffer flushes to
3833         the GPU thread/process without the overhead of a true glFlush.
3834
3835         CCTextureUpdaterTest updated to recognize shallow flushes.
3836
3837         * platform/chromium/support/Extensions3DChromium.cpp:
3838         (WebCore::Extensions3DChromium::shallowFlushCHROMIUM):
3839         (WebCore):
3840         * platform/graphics/chromium/Extensions3DChromium.h:
3841         (Extensions3DChromium):
3842         * platform/graphics/chromium/cc/CCGraphicsContext.h:
3843         * platform/graphics/chromium/cc/CCResourceProvider.cpp:
3844         (WebCore::CCResourceProvider::shallowFlushIfSupported):
3845         (WebCore):
3846         (WebCore::CCResourceProvider::CCResourceProvider):
3847         (WebCore::CCResourceProvider::initialize):
3848         * platform/graphics/chromium/cc/CCResourceProvider.h:
3849         (CCResourceProvider):
3850         * platform/graphics/chromium/cc/CCTextureUpdater.cpp:
3851         (WebCore::CCTextureUpdater::update):
3852
3853 2012-07-23  Hanyee Kim  <choco@company100.net>
3854
3855         When using TextureMapper, WebKit does not retain final value of opacity in animations, unless it is specified on the last key frame.
3856         https://bugs.webkit.org/show_bug.cgi?id=91322
3857
3858         Reviewed by Noam Rosenthal.
3859
3860         When -webkit-fill-mode is forwards, GraphicsLayerAnimation::apply does not apply
3861         the property values defined in the last executing keyframe after the final iteration of animation.
3862
3863         This patch does not return right after the end of animation, but it keeps applying
3864         the property values defined in the last executing keyframe.
3865         Add normalizedAnimationValueForFillsForwards function that returns a normalized value of the
3866         last executing keyframe.
3867
3868         Link to CSS Animations spec: http://www.w3.org/TR/css3-animations/#animation-fill-mode-property
3869
3870         Test: animations/fill-mode-forwards2.html
3871
3872         * platform/graphics/GraphicsLayerAnimation.cpp:
3873         (WebCore::normalizedAnimationValueForFillsForwards):
3874         (WebCore):
3875         (WebCore::GraphicsLayerAnimation::apply):
3876
3877 2012-07-23  Sheriff Bot  <webkit.review.bot@gmail.com>
3878
3879         Unreviewed, rolling out r123184, r123195, and r123197.
3880         http://trac.webkit.org/changeset/123184
3881         http://trac.webkit.org/changeset/123195
3882         http://trac.webkit.org/changeset/123197
3883         https://bugs.webkit.org/show_bug.cgi?id=92049
3884
3885         pagecycler regression (Requested by morrita on #webkit).
3886
3887         * WebCore.exp.in:
3888         * dom/Document.cpp:
3889         (WebCore::Document::Document):
3890         (WebCore::Document::~Document):
3891         (WebCore::Document::suggestedMIMEType):
3892         * dom/Document.h:
3893         (WebCore):
3894         (WebCore::Node::isDocumentNode):
3895         (WebCore::Node::Node):
3896         * dom/Node.cpp:
3897         (WebCore::Node::~Node):
3898         (WebCore::Node::setDocument):
3899         (WebCore):
3900         (WebCore::Node::setTreeScope):
3901         (WebCore::Node::treeScope):
3902         (WebCore::Node::isInShadowTree):
3903         (WebCore::Node::reportMemoryUsage):
3904         * dom/Node.h:
3905         (Node):
3906         (WebCore::Node::document):
3907         (WebCore::Node::inDocument):
3908         * dom/NodeRareData.h:
3909         (WebCore::NodeRareData::NodeRareData):
3910         (WebCore::NodeRareData::treeScope):
3911         (WebCore::NodeRareData::setTreeScope):
3912         (NodeRareData):
3913         * dom/ShadowRoot.cpp:
3914         (WebCore::ShadowRoot::ShadowRoot):
3915         * dom/TreeScope.cpp:
3916         (WebCore::TreeScope::TreeScope):
3917         (WebCore::TreeScope::setParentTreeScope):
3918         * dom/TreeScope.h:
3919         (WebCore):
3920         (WebCore::TreeScope::idTargetObserverRegistry):
3921         (TreeScope):
3922         * dom/TreeScopeAdopter.cpp:
3923         (WebCore::TreeScopeAdopter::moveTreeToNewScope):
3924         (WebCore::TreeScopeAdopter::moveNodeToNewDocument):
3925         * editing/MoveSelectionCommand.cpp:
3926         * editing/RemoveNodeCommand.cpp:
3927         * editing/RemoveNodePreservingChildrenCommand.cpp:
3928         * inspector/PageConsoleAgent.cpp:
3929
3930 2012-07-23  Roger Fong  <roger_fong@apple.com>
3931
3932         On Windows, if select element is off screen horizontally, 
3933         menu is either inappropriately resized or positioned offscreen.
3934         https://bugs.webkit.org/show_bug.cgi?id=91913
3935         <rdar://problem/7611229>
3936
3937         Reviewed by Tim Horton.
3938
3939         If the select element is positioned off the edge of the screen to the left, 
3940         the menu is resized. It should not be resized, just shifted to remain on the screen.
3941         If the select element is positioned off the edge of the screen to the right, 
3942         the menu goes off screen instead of being shifted over to appear on screen.
3943         This problem only occurs on Windows.
3944         
3945         Test: ManualTests/win/select-menu-off-screen.html
3946
3947         * platform/win/PopupMenuWin.cpp:
3948         (WebCore::PopupMenuWin::calculatePositionAndSize):
3949         Modified final horizontal position calculation code to position
3950         popup menu on screen if it would otherwise go off.
3951         
3952 2012-07-23  David Dorwin  <ddorwin@chromium.org>
3953
3954         Fixed crash in webkitAddKey() when key parameter is null.
3955         https://bugs.webkit.org/show_bug.cgi?id=85444
3956
3957         Reviewed by Kentaro Hara.
3958
3959         Reference: Step 1 of http://dvcs.w3.org/hg/html-media/raw-file/5f76a0b43836/encrypted-media/encrypted-media.html#dom-addkey
3960
3961         Tests: media/encrypted-media/encrypted-media-syntax.html 
3962
3963         * html/HTMLMediaElement.cpp:
3964         (WebCore::HTMLMediaElement::webkitAddKey):
3965
3966 2012-07-23  Hayato Ito  <hayato@chromium.org>
3967
3968         A FocusScope for a distributed node should not be its TreeScope.
3969         https://bugs.webkit.org/show_bug.cgi?id=91829
3970
3971         Reviewed by Dimitri Glazkov.
3972
3973         Current implementation of FocusScope::focusScopeOf(Node*) returns
3974         the given node's treeScope().  That does not apply if the node is
3975         a distributed node.  We should calculate a FocusScope for a
3976         distributed node by traversing ancestor nodes in Composed Shadow
3977         Tree.
3978
3979         Test: fast/dom/shadow/focus-navigation-with-distributed-nodes.html
3980
3981         * page/FocusController.cpp:
3982         (WebCore::FocusScope::focusScopeOf):
3983
3984 2012-07-23  Douglas Stockwell  <dstockwell@google.com>
3985
3986         Null-pointer crash when parsing border-image
3987         https://bugs.webkit.org/show_bug.cgi?id=91963
3988
3989         Reviewed by Darin Adler.
3990
3991         Test: fast/css/border-image-fill-crash.html
3992
3993         * css/CSSParser.cpp:
3994         (WebCore::CSSParser::parseBorderImageRepeat): Handle the case where
3995         parseBorderImageRepeat is called when the value list is empty.
3996
3997 2012-07-23  Bem Jones-Bey  <bjonesbe@adobe.com>
3998
3999         [CSS Exclusions] SVG shape errors should invalidate exclusion shapes
4000         https://bugs.webkit.org/show_bug.cgi?id=91761
4001
4002         Reviewed by Andreas Kling.
4003
4004         CSS exclusion shapes that are specified with negative radiuses or
4005         height/width are now considered invalid and ignored.
4006
4007         Tests added to
4008         LayoutTests/fast/exclusions/parsing-wrap-shape-lengths.html
4009
4010         * css/CSSParser.cpp:
4011         (WebCore::CSSParser::parseExclusionShapeRectangle):
4012         (WebCore::CSSParser::parseExclusionShapeCircle):
4013         (WebCore::CSSParser::parseExclusionShapeEllipse):
4014
4015 2012-07-23  Tien-Ren Chen  <trchen@chromium.org>
4016
4017         [chromium] Implement scrollbar theme for Android
4018         https://bugs.webkit.org/show_bug.cgi?id=91674
4019
4020         Reviewed by Adam Barth.
4021
4022         Previously the scrollbar for Android was implemented as an extra
4023         drawing pass in the compositor. Now we switch to use the standard
4024         ScrollbarTheme mechanism.
4025
4026         No new tests. We use mock scrollbars during layout test to share
4027         pixel results with Linux.